From: Ian Jackson Subject: [PATCH 1/2] libxl: Fix a couple of log messages to print correct errnos Date: Thu, 16 Oct 2014 18:44:12 +0100 Message-ID: <1413481453-25801-1-git-send-email-ian.jackson@eu.citrix.com> References: <21566.40395.18224.864777@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21566.40395.18224.864777@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: ian.campbell@eu.citrix.com, Ian Jackson , Wei Liu List-Id: xen-devel@lists.xenproject.org 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 --- tools/libxl/libxl_create.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 8b82584..8ae9701 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -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; } -- 1.7.10.4