[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 4/7] libxl/vcpuset: Print error if libxl_set_vcpuonline returns ERROR_DOMAIN_NOTFOUND
Instead of just printing an generic error. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/xl_cmdimpl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 1c07ac6..0ccf257 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5223,6 +5223,7 @@ static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host) char *endptr; unsigned int max_vcpus, i; libxl_bitmap cpumap; + int rc; libxl_bitmap_init(&cpumap); max_vcpus = strtoul(nr_vcpus, &endptr, 10); @@ -5253,8 +5254,12 @@ static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host) for (i = 0; i < max_vcpus; i++) libxl_bitmap_set(&cpumap, i); - if (libxl_set_vcpuonline(ctx, domid, &cpumap) < 0) - fprintf(stderr, "libxl_set_vcpuonline failed domid=%d max_vcpus=%d\n", domid, max_vcpus); + rc = libxl_set_vcpuonline(ctx, domid, &cpumap); + if (rc == ERROR_DOMAIN_NOTFOUND) + fprintf(stderr, "Domain %u does not exist.\n", domid); + else if (rc) + fprintf(stderr, "libxl_set_vcpuonline failed domid=%d max_vcpus=%d," \ + " rc: %d\n", domid, max_vcpus, rc); libxl_bitmap_dispose(&cpumap); } -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |