[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 2/5] libxl: remove device model path in libxl__device_model_destroy
... and not devices_destroy_cb because it is the right place to clean up device model stuff. And the path should use LIBXL_TOOLSTACK_DOMID instead of hardcoded 0. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- Changes in v2: 1. Use helper function to generate xenstore path. --- tools/libxl/libxl.c | 2 -- tools/libxl/libxl_dm.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 94b4d59..75f1457 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1659,8 +1659,6 @@ static void devices_destroy_cb(libxl__egc *egc, xs_rm(ctx->xsh, XBT_NULL, libxl__xs_libxl_path(gc, domid)); xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc, - "/local/domain/0/device-model/%d", domid)); - xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc, "/local/domain/%d/hvmloader", domid)); /* This is async operation, we already hold CTX lock */ diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index a8b08f2..6d34cb9 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -1642,6 +1642,11 @@ out: int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid) { + char *path = libxl__device_model_xs_path(gc, LIBXL_TOOLSTACK_DOMID, + domid, ""); + if (!xs_rm(CTX->xsh, XBT_NULL, path)) + LOG(ERROR, "xs_rm failed for %s", path); + /* We should try to destroy the device model anyway. */ return kill_device_model(gc, GCSPRINTF("/local/domain/%d/image/device-model-pid", domid)); } -- 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 |