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

Re: [Xen-devel] [PATCH v5 7/8] xl/libxl: implement QDISK libxl_device_disk_local_attach



On Fri, 4 May 2012, Ian Jackson wrote:
> Stefano Stabellini writes ("[PATCH v5 7/8] xl/libxl: implement QDISK 
> libxl_device_disk_local_attach"):
> > - Spawn a QEMU instance at boot time to handle disk local attach
> > requests.
> ...
> > diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
> > index 7a1e017..e180498 100644
> > --- a/tools/libxl/libxl_internal.c
> > +++ b/tools/libxl/libxl_internal.c
> ...
> > +                    rc = xs_transaction_end(ctx->xsh, t, 0);
> > +                } while (rc == 0 && errno == EAGAIN);
> > +                t = XBT_NULL;
> > +                if (rc == 0) {
> > +                    LOGE(ERROR, "xenstore transaction failed");
> > +                    goto out;
> 
> Maybe I'm being excessively picky, but I think "rc" should be used
> only for a variable which contains libxl error codes.  I had to do a
> double-take when I saw
>   if (rc == 0) {
>      error handling;
> since rc==0 is of course the success case.

Should I s/rc/ret/ in this function?

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