# HG changeset patch
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# Date 1323766195 -3600
# Node ID 35c322e6020501447936e56cafceb8bbc1b2e980
# Parent a36942bf253c957179d4fb406ac0a45c0ddd2b28
libxl: set frontend status to 6 on domain destroy
Set frontend status to 6 on domain destruction and wait for devices to
be disconnected before executing hotplug scripts.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
diff -r a36942bf253c -r 35c322e60205 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c Tue Dec 13 09:49:55 2011 +0100
+++ b/tools/libxl/libxl_device.c Tue Dec 13 09:49:55 2011 +0100
@@ -513,10 +513,7 @@ int libxl__device_destroy(libxl__gc *gc,
char *be_path = libxl__device_backend_path(gc, dev);
char *fe_path = libxl__device_frontend_path(gc, dev);
- /*
- * Run hotplug scripts, which will probably not be able to
- * execute successfully since the device may still be plugged
- */
+ libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/%s", fe_path, "state"), "6");
libxl__device_execute_hotplug(gc, dev, DISCONNECT);
xs_rm(ctx->xsh, XBT_NULL, be_path);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# Date 1323766195 -3600
# Node ID 35c322e6020501447936e56cafceb8bbc1b2e980
# Parent a36942bf253c957179d4fb406ac0a45c0ddd2b28
libxl: set frontend status to 6 on domain destroy
Set frontend status to 6 on domain destruction and wait for devices to
be disconnected before executing hotplug scripts.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
diff -r a36942bf253c -r 35c322e60205 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c Tue Dec 13 09:49:55 2011 +0100
+++ b/tools/libxl/libxl_device.c Tue Dec 13 09:49:55 2011 +0100
@@ -513,10 +513,7 @@ int libxl__device_destroy(libxl__gc *gc,
char *be_path = libxl__device_backend_path(gc, dev);
char *fe_path = libxl__device_frontend_path(gc, dev);
- /*
- * Run hotplug scripts, which will probably not be able to
- * execute successfully since the device may still be plugged
- */
+ libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/%s", fe_path, "state"), "6");
libxl__device_execute_hotplug(gc, dev, DISCONNECT);
xs_rm(ctx->xsh, XBT_NULL, be_path);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel