libxl: split forced and non-forced uses of libxl__device_del
authorIan Campbell <ian.campbell@citrix.com>
Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 18 Oct 2011 12:36:42 +0000 (13:36 +0100)
commit391419266cb6799d6e2c8174403984ce8e566206
treefa84c13c42036bec2c9165acb739bae1f55578b2
parent2720c32fad97d5f60c7279ce149090d524a3ac30
libxl: split forced and non-forced uses of libxl__device_del

Most forced users can now simply call libxl__device_destroy directly.

libxl__devices_destroy is something of a special case, it is really
just iterating over an opaque set of xenstore directories and removing
them. Until this can be refactored just do the force-remove case
manually, doing otherwise led to too much entanglement with the other
callers of libxl__device_destroy which do know about specific device
types.

For the time being do the same in libxl__device_pci_remove_xenstore.

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>
tools/libxl/libxl.c
tools/libxl/libxl_device.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_pci.c