|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: log on failure in cpupool_info and libxl__domain_cpupool
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1340956699 -3600
# Node ID d70030d6a87c7237afa78435b3a9b2a11628a63b
# Parent 19d48015b5aa38ca913962a4cc7367bb79ed7244
libxl: log on failure in cpupool_info and libxl__domain_cpupool
Also in cpupool_info propagate the failure value from
libxl_cpumap_alloc.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---
diff -r 19d48015b5aa -r d70030d6a87c tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Fri Jun 29 08:57:11 2012 +0100
+++ b/tools/libxl/libxl.c Fri Jun 29 08:58:19 2012 +0100
@@ -571,16 +571,27 @@ 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);
return ERROR_FAIL;
+ }
if (exact && xcinfo->cpupool_id != poolid)
+ {
+ LOG(ERROR, "got info for cpupool%d, wanted cpupool%d\n",
+ xcinfo->cpupool_id, poolid);
goto out;
+ }
info->poolid = xcinfo->cpupool_id;
info->sched = xcinfo->sched_id;
info->n_dom = xcinfo->n_dom;
- if (libxl_cpumap_alloc(CTX, &info->cpumap, 0))
+ rc = libxl_cpumap_alloc(CTX, &info->cpumap, 0);
+ if (rc)
+ {
+ LOG(ERROR, "unable to allocate cpumap %d\n", rc);
goto out;
+ }
memcpy(info->cpumap.map, xcinfo->cpumap, info->cpumap.size);
rc = 0;
diff -r 19d48015b5aa -r d70030d6a87c tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c Fri Jun 29 08:57:11 2012 +0100
+++ b/tools/libxl/libxl_dom.c Fri Jun 29 08:58:19 2012 +0100
@@ -64,10 +64,15 @@ int libxl__domain_cpupool(libxl__gc *gc,
ret = xc_domain_getinfolist(CTX->xch, domid, 1, &info);
if (ret != 1)
+ {
+ LOGE(ERROR, "getinfolist failed %d\n", ret);
return ERROR_FAIL;
+ }
if (info.domain != domid)
+ {
+ LOGE(ERROR, "got info for dom%d, wanted dom%d\n", info.domain, domid);
return ERROR_FAIL;
-
+ }
return info.cpupool;
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |