[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: Fail domain creation if pci assignment fails
commit a8b558624b12333400a5f0bfd22c42a9f62e1fe2 Author: George Dunlap <george.dunlap@xxxxxxxxxxxxx> AuthorDate: Tue Mar 4 13:38:18 2014 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Mon Mar 10 12:01:06 2014 +0000 libxl: Fail domain creation if pci assignment fails Actually pay attention to the return value of libxl__device_pci_add. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> --- tools/libxl/libxl_create.c | 10 ++++++++-- 1 files 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, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |