This patch will make xm return a exit code of 3 if `xm list
<non_existant_domain>` is done rather than the generic code of 1. I used
3
because XendClient had a macro setup pointing ERROR_INVALID_DOMAIN to 3.
~Shaun Reitan
diff -r 536475e491cc tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Mon Sep 15 11:42:31 2008 +0100
+++ b/tools/python/xen/xm/main.py Wed Sep 17 06:20:38 2008 -0700
@@ -2926,6 +2926,7 @@
except xmlrpclib.Fault, ex:
if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN:
err("Domain ''%s'' does not exist." %
ex.faultString)
+ return False, ex.faultCode
else:
err(ex.faultString)
_usage(cmd_name)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
just curious, did i go about this the right way to get it applied? ~Shaun _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Sep-20 08:06 UTC
Re: [Xen-devel] Re: [PATCH] xm list ERROR_INVALID_DOMAIN
Yes, it''s in the staging tree now (http://xenbits.xensource.com/staging/xen-unstable.hg). -- Keir On 19/9/08 20:32, "Shaun R." <mailinglists@unix-scripts.com> wrote:> just curious, did i go about this the right way to get it applied? > > ~Shaun > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel