diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2012-11-29 14:58:36 +0000 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2012-11-29 14:58:36 +0000 |
commit | a98a6d65128638318f083beaad43d03dcd53dd45 (patch) | |
tree | 7871bd4dcf4931f45a2e5a0a6a2a064f74371e35 | |
parent | 13190e476d9ed62e377219c8a1e6e3759b3af6da (diff) | |
download | xen-a98a6d65128638318f083beaad43d03dcd53dd45.tar.gz xen-a98a6d65128638318f083beaad43d03dcd53dd45.tar.bz2 xen-a98a6d65128638318f083beaad43d03dcd53dd45.zip |
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>
xen-unstable changeset: 26185:d66987697fe3
Backport-requested-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/libxl/libxl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 25b9f41962..1ec1d293c8 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -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; } |