This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] xm, no such domain error code...

To: "Shaun R." <mailinglists@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xm, no such domain error code...
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 17 Sep 2008 10:30:53 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 17 Sep 2008 02:31:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <gaoq8p$uem$1@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <gaoq8p$uem$1@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Shaun R. writes ("[Xen-devel] xm, no such domain error code..."):
> Right now xm will return 1 if you run `xm list non_existant_domain`
> Wouldnt it be a better idea to have a specific error code for this error so 
> that scripts wrapping around xm can better determine if the domain does not 
> exist or if xm just failed for whatever reason?

Yes.  Probably the right thing is to keep 1 for general failure, since
it will be too hard to track down all of the places it is used.  So we
should start new specific exit codes at 10 or 16 or something.

Would you care to prepare a suitable patch ?  I haven't looked at the
code recently but perhaps you can transform the domain not found
exception into a specific exit code in a single place.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>