[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-cvs
Subject:    [Xen-changelog] [xen-unstable] xl: Suppress spurious warning message for cpupool-list
From:       Xen patchbot-unstable <patchbot () xen ! org>
Date:       2012-11-23 16:44:08
Message-ID: E1TbwMK-0000Wn-Ig () xenbits ! xen ! org
[Download RAW message or body]

# HG changeset patch
# User George Dunlap <george.dunlap@eu.citrix.com>
# Date 1353668774 0
# Node ID d66987697fe3eea05b51773db7e9f43572be2db9
# Parent  7b4449bdb980caee8efc498d5ea48f772331df2f
xl: Suppress spurious warning message for cpupool-list

libxl_cpupool_list() enumerates the cpupools by "probing": calling
cpupool_info, starting at 0 and stopping when it gets an error. However,
cpupool_info will print an error when the call to xc_cpupool_getinfo() fails,
resulting in every xl command that uses libxl_list_cpupool (such as
cpupool-list) printing that error message spuriously.

Since at the moment the times we want to print the message correspond
with the use of the existing "exact" parameter, use it to decide
whether to print the message or not.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
---


diff -r 7b4449bdb980 -r d66987697fe3 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Nov 22 10:47:58 2012 +0100
+++ b/tools/libxl/libxl.c	Fri Nov 23 11:06:14 2012 +0000
@@ -593,7 +593,8 @@ static int cpupool_info(libxl__gc *gc,
     xcinfo = xc_cpupool_getinfo(CTX->xch, poolid);
     if (xcinfo == NULL)
     {
-        LOGE(ERROR, "failed to get info for cpupool%d\n", poolid);
+        if (exact || errno != ENOENT)
+            LOGE(ERROR, "failed to get info for cpupool%d\n", poolid);
         return ERROR_FAIL;
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic