aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_pci.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-10-18 13:36:42 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-10-18 13:36:42 +0100
commit2720c32fad97d5f60c7279ce149090d524a3ac30 (patch)
treed8eb61056de23f8b86ec204c6cfc4ef3a549ca55 /tools/libxl/libxl_pci.c
parentc918c9d852268f6e4f6edd8ebcc125cf7b7cdb9d (diff)
downloadxen-2720c32fad97d5f60c7279ce149090d524a3ac30.tar.gz
xen-2720c32fad97d5f60c7279ce149090d524a3ac30.tar.bz2
xen-2720c32fad97d5f60c7279ce149090d524a3ac30.zip
libxl: separate forced and non-forced device remove.
The function libxl__device_destroy currently takes a force parameter however: * in the forced case we initiate a graceful shutdown and then immediately nuke the backend directory, quite likely before anyone got a chance to react. * the callers all have a "wait" variable and pass in "!wait" as the force argument which is confusing since not waiting is not really the same thing as forcing the destroy. Therefore split the function into libxl__device_remove and libxl__device_destroy. The former initiates a graceful shutdown which the latter simply nukes the backend directory. This makes some of the callers look a bit odd but that should fall out as I continue to pull this piece of string. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_pci.c')
-rw-r--r--tools/libxl/libxl_pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index 33dd0606d4..90e1f73ea0 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -411,8 +411,7 @@ retry_transaction2:
if (num == 1) {
char *fe_path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/frontend", be_path));
- libxl__device_destroy(gc, be_path, 1);
- xs_rm(ctx->xsh, XBT_NULL, be_path);
+ libxl__device_destroy(gc, be_path);
xs_rm(ctx->xsh, XBT_NULL, fe_path);
return 0;
}