[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 Thu, Sep 28, 2017 at 06:23:16PM +0200, Dario Faggioli wrote:
> On Wed, 2017-09-20 at 17:10 +0100, Wei Liu wrote:
> > 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.
> > 
> True. However, there's been efforts for improving that (consistency, I
> mean) and getting to a situation where only EXIT_SUCCESS or
> EXIT_FAILURE are used.
> 
> I know it's not a done deal yet, and that it's being a slow process,
> but I think it would be nice if new code would help achieving that,
> instead than making it more difficult. :-)
> 
> Then...
> 
> > I'm not too fussed whether it is 2 or EXIT_FAILURE.
> > 
> ...this is just my opinion (as one of the ones which was part of that
> effort, and that plans to get back to finish it at some point). You're
> the maintainer, your rules. :-P :-D
> 

This makes sense.

If Yi doesn't end up changing it to EXIT_FAILURE, I will do that myself.

_______________________________________________
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®.