From: Ian Campbell Date: Wed, 2 Nov 2011 16:25:18 +0000 (+0000) Subject: libxl: libxl__device_pci_destroy_all should succeed if there is no PCI bus X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=70e7871d0f8fef6271e3ec3d19ecbaa78eb98d9f;p=xen.git libxl: libxl__device_pci_destroy_all should succeed if there is no PCI bus 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 Acked-by: Roger Pau Monne Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 3cb246eecc..17dc11493d 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -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