libxl: libxl__device_pci_destroy_all should succeed if there is no PCI bus
authorIan Campbell <ian.campbell@citrix.com>
Wed, 2 Nov 2011 16:25:18 +0000 (16:25 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 2 Nov 2011 16:25:18 +0000 (16:25 +0000)
Since 23915:4c4b72c94bac "" it is possible that no bus exists and this is not
an error. Removes the following spurious warning when destroying a PV domain
with no PCI devices:
    libxl: error: libxl.c:759:libxl_domain_destroy: pci shutdown failed
for domid 1005

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_pci.c

index 3cb246eecc715be1d98d535c10632456c9eb2ce8..17dc11493dfe8f26242f992b886504e6b501a988 100644 (file)
@@ -1098,7 +1098,7 @@ int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid)
 
     pcidevs = libxl_device_pci_list(ctx, domid, &num);
     if ( pcidevs == NULL )
-        return ERROR_FAIL;
+        return 0;
 
     for (i = 0; i < num; i++) {
         /* Force remove on shutdown since, on HVM, qemu will not always