[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] libxl_pci: `starting' is a bool



commit f7f71f50946eab491ce5b72af0df79a1033ed65b
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Thu May 9 16:46:44 2019 +0100
Commit:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CommitDate: Fri Sep 20 10:41:01 2019 +0100

    libxl_pci: `starting' is a bool
    
    The argument `starting' is used as a boolean, change its type to
    reflex that throughout libxl_pci.c.
    
    No functional changes.
    
    Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_internal.h |  3 ++-
 tools/libxl/libxl_pci.c      | 14 ++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index c111356868..56b0d56432 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1557,7 +1557,8 @@ _hidden int libxl__pci_topology_init(libxl__gc *gc,
 
 /* from libxl_pci */
 
-_hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, 
libxl_device_pci *pcidev, int starting);
+_hidden int libxl__device_pci_add(libxl__gc *gc, uint32_t domid,
+                                  libxl_device_pci *pcidev, bool starting);
 _hidden int libxl__device_pci_destroy_all(libxl__gc *gc, uint32_t domid);
 _hidden bool libxl__is_igd_vga_passthru(libxl__gc *gc,
                                         const libxl_domain_config *d_config);
diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
index cef20a839e..4b1aed1895 100644
--- a/tools/libxl/libxl_pci.c
+++ b/tools/libxl/libxl_pci.c
@@ -116,7 +116,7 @@ static int libxl__create_pci_backend(libxl__gc *gc, 
uint32_t domid,
 static int libxl__device_pci_add_xenstore(libxl__gc *gc,
                                           uint32_t domid,
                                           const libxl_device_pci *pcidev,
-                                          int starting)
+                                          bool starting)
 {
     flexarray_t *back;
     char *num_devs, *be_path;
@@ -983,7 +983,8 @@ static int qemu_pci_add_xenstore(libxl__gc *gc, uint32_t 
domid,
     return rc;
 }
 
-static int do_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci *pcidev, 
int starting)
+static int do_pci_add(libxl__gc *gc, uint32_t domid,
+                      libxl_device_pci *pcidev, bool starting)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     libxl_domain_type type = libxl__domain_type(gc, domid);
@@ -1164,7 +1165,7 @@ int libxl_device_pci_add(libxl_ctx *ctx, uint32_t domid,
 {
     AO_CREATE(ctx, domid, ao_how);
     int rc;
-    rc = libxl__device_pci_add(gc, domid, pcidev, 0);
+    rc = libxl__device_pci_add(gc, domid, pcidev, false);
     libxl__ao_complete(egc, ao, rc);
     return AO_INPROGRESS;
 }
@@ -1186,7 +1187,8 @@ static int libxl_pcidev_assignable(libxl_ctx *ctx, 
libxl_device_pci *pcidev)
     return i != num;
 }
 
-int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, libxl_device_pci 
*pcidev, int starting)
+int libxl__device_pci_add(libxl__gc *gc, uint32_t domid,
+                          libxl_device_pci *pcidev, bool starting)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     unsigned int orig_vdev, pfunc_mask;
@@ -1241,7 +1243,7 @@ int libxl__device_pci_add(libxl__gc *gc, uint32_t domid, 
libxl_device_pci *pcide
     if (stubdomid != 0) {
         libxl_device_pci pcidev_s = *pcidev;
         /* stubdomain is always running by now, even at create time */
-        rc = do_pci_add(gc, stubdomid, &pcidev_s, 0);
+        rc = do_pci_add(gc, stubdomid, &pcidev_s, false);
         if ( rc )
             goto out;
     }
@@ -1294,7 +1296,7 @@ static void libxl__add_pcidevs(libxl__egc *egc, libxl__ao 
*ao, uint32_t domid,
     int i, rc = 0;
 
     for (i = 0; i < d_config->num_pcidevs; i++) {
-        rc = libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], 1);
+        rc = libxl__device_pci_add(gc, domid, &d_config->pcidevs[i], true);
         if (rc < 0) {
             LOGD(ERROR, domid, "libxl_device_pci_add failed: %d", rc);
             goto out;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.