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

Re: [Xen-devel] [PATCH v3 14/15] tools: implement new generic set value interface and MBA set value command



On Tue, Sep 19, 2017 at 12:30:59PM +0100, Roger Pau Monné wrote:
> > +    type = LIBXL_PSR_CBM_TYPE_MBA_THRTL;
> > +
> > +    if (libxl_bitmap_is_empty(&target_map))
> > +        libxl_bitmap_set_any(&target_map);
> > +
> > +    if (argc != optind + 2) {
> > +        help("psr-mba-set");
> > +        return 2;
> > +    }
> 
> Can you do this check at the beginning of the function? Also why
> return 2 instead of EXIT_FAILURE?
> 

Returning 2 is used in several places when help string is printed.  It
isn't really consistent in xl though.

I'm not too fussed whether it is 2 or EXIT_FAILURE.

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

 


Rackspace

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