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

Re: [Xen-devel] [PATCH 32/35] libxl: Fix libxl__get_domid error reporting



On Thu, Jun 25, 2015 at 06:44:32PM +0100, Ian Jackson wrote:
> Make it log something if the xenstore path does not exist.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>

Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

> ---
> v4: New patch in this version of the series.
> ---
>  tools/libxl/libxl.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 54b398b..c5aad11 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -1962,8 +1962,10 @@ int libxl__get_domid(libxl__gc *gc, uint32_t *domid)
>      const char *xs_domid;
>  
>      rc = libxl__xs_read_checked(gc, XBT_NULL, DOMID_XS_PATH, &xs_domid);
> -    if (rc || !xs_domid) {
> -        rc = rc ? rc : ERROR_FAIL;
> +    if (rc) goto out;
> +    if (!xs_domid) {
> +        LOG(ERROR, "failed to get own domid (%s)", DOMID_XS_PATH);
> +        rc = ERROR_FAIL;
>          goto out;
>      }
>  
> -- 
> 1.7.10.4

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