[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 13/16] libxl, xl: Fix two minor bugs in domain destruction
* If /local/domain/<domid>/device does not exist, this is not necessarily an error. It probably means the domain has been partially destroyed already. * Have xl report errors from libxl_domain_destroy. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_device.c | 2 +- tools/libxl/xl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 9fdd0b4..ca20080 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -301,7 +301,7 @@ int libxl_devices_destroy(struct libxl_ctx *ctx, uint32_t domid, int force) if (!l1) { XL_LOG(&clone, XL_LOG_ERROR, "%s is empty", path); libxl_ctx_free(&clone); - return -1; + return 0; } for (i = 0; i < num1; i++) { if (!strcmp("vfs", l1[i])) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index fcb4fc4..f1b54e4 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -1277,8 +1277,10 @@ void unpause_domain(char *p) void destroy_domain(char *p) { + int rc; find_domain(p); - libxl_domain_destroy(&ctx, domid, 0); + rc = libxl_domain_destroy(&ctx, domid, 0); + if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n.",rc); exit(-1); } } void list_domains(int verbose) -- 1.5.6.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |