All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libxl: Fail domain creation if pci assignment fails
@ 2014-03-04 13:38 George Dunlap
  2014-03-04 13:38 ` [PATCH 2/2] xl: Add "seize" option to PCI devices George Dunlap
  2014-03-10 12:04 ` [PATCH 1/2] libxl: Fail domain creation if pci assignment fails Ian Jackson
  0 siblings, 2 replies; 6+ messages in thread
From: George Dunlap @ 2014-03-04 13:38 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell

Actually pay attention to the return value of libxl__device_pci_add.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
---
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxl/libxl_create.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index a604cd8..53e7cb6 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1262,8 +1262,14 @@ static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *multidev,
         goto error_out;
     }
 
-    for (i = 0; i < d_config->num_pcidevs; i++)
-        libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], 1);
+    for (i = 0; i < d_config->num_pcidevs; i++) {
+        ret = libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], 1);
+        if (ret < 0) {
+            LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
+                       "libxl_device_pci_add failed: %d", ret);
+            goto error_out;
+        }
+    }
 
     if (d_config->num_pcidevs > 0) {
         ret = libxl__create_pci_backend(gc, domid, d_config->pcidevs,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-10 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 13:38 [PATCH 1/2] libxl: Fail domain creation if pci assignment fails George Dunlap
2014-03-04 13:38 ` [PATCH 2/2] xl: Add "seize" option to PCI devices George Dunlap
2014-03-04 14:06   ` George Dunlap
2014-03-04 14:09     ` Ian Jackson
2014-03-10 12:05   ` Ian Jackson
2014-03-10 12:04 ` [PATCH 1/2] libxl: Fail domain creation if pci assignment fails Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.