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

Re: [Xen-devel] [PATCH for-4.6] libxl: fix libxl__build_hvm error code return path



Wei Liu writes ("[PATCH for-4.6] libxl: fix libxl__build_hvm error code return 
path"):
> In 25652f23 ("tools/libxl: detect and avoid conflicts with RDM"), new
> code was added to use rc to store libxl function call return value,
> which complied to libxl coding style. That patch, however, didn't change
> other locations where return value was stored in ret. In the end
> libxl__build_hvm could return 0 when it failed.
> 
> Explicitly set rc to ERROR_FAIL in all error paths to fix this.
...
>          ret = libxl__vnuma_build_vmemrange_hvm(gc, domid, info, state, 
> &args);
>          if (ret) {

Why not change all the assignemnts to ret to assignments to rc, and
abolish ret ?

>              LOGEV(ERROR, ret, "hvm build vmemranges failed");
> +            rc = ERROR_FAIL;

Certainly this is wrong because it smashes all errors into ERROR_FAIL.

Ian.

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