[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] libxl: check return value of libxl_vcpu_setaffinity
That function can fail. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> --- tools/libxl/libxl_dom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index a88db69..bc2e596 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -468,8 +468,12 @@ static int set_vnuma_affinity(libxl__gc *gc, uint32_t domid, goto out; } - libxl_for_each_set_bit(j, v->vcpus) - libxl_set_vcpuaffinity(CTX, domid, j, NULL, &cpumap); + libxl_for_each_set_bit(j, v->vcpus) { + rc = libxl_set_vcpuaffinity(CTX, domid, j, NULL, &cpumap); + if (rc) { + LOG(ERROR, "Can't set cpu affinity for %d", j); + goto out; + } } out: -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |