]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: Fix a couple of log messages to print correct errnos
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 16 Oct 2014 17:44:12 +0000 (18:44 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 20 Oct 2014 12:51:27 +0000 (13:51 +0100)
xc_domain_create and xc_cpupool_movedomain do not return errno values;
they return -1 and set errno.  Fix the logging accordingly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c

index 8b825849d171b7a00d14f0fe11c001b6a463ec35..8ae97017071d8bd3c86627bd7d12ace6b679e506 100644 (file)
@@ -515,14 +515,14 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_create_info *info,
 
     ret = xc_domain_create(ctx->xch, info->ssidref, handle, flags, domid);
     if (ret < 0) {
-        LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "domain creation fail");
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "domain creation fail");
         rc = ERROR_FAIL;
         goto out;
     }
 
     ret = xc_cpupool_movedomain(ctx->xch, info->poolid, *domid);
     if (ret < 0) {
-        LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "domain move fail");
+        LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "domain move fail");
         rc = ERROR_FAIL;
         goto out;
     }