[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 8/9] xl: make error reporting of cpupool subcommands consistent



On Wed, 2015-03-11 at 15:04 +0000, Wei Liu wrote:
> On Wed, Mar 11, 2015 at 02:52:31PM +0000, Ian Campbell wrote:

> > I think having more consistent exist codes from xl would be nice, but I
> > don't think the libxl error codes are the ones to use, since they don't
> > really map semantically onto what I would expect a CLI tool to fail with
> > (I'm not sure what I would expect though, something a bit higher level
> > on a command specific basis probably).
> > 
> 
> I agree that libxl error codes are not the ones to use.
> 
> Since we haven't explicitly defined any return value in xl manpage, I
> think we should use EXIT_SUCCESS and EXIT_FAILURE per exit(3). 
>
I like the idea.

> They are
> more appropriate then 0 and 1.
> 
Indeed. However, as far as this patch is concerned, what should I do?

 a) drop it, and leave libxl error code in place, until we convert 
    everything to EXIT_SUCCESS/FAILURE
 b) keep it, we'll convert the 0/1 to EXIT_SUCCESS/FAILURE in later
    patch(es)
 c) turn libxl error codes into EXIT_SUCCESS/FAILURE at least for this
    functions, since I'm touching them, the rest will come with later
    patch(es)
?

My opinion, I don't like c), so I'd go for either a) or b), with a
slight preference for b).

Let me know...

Regards,
Dario

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.