[PATCH 1/4] qemu: hostdev: Unify naming for qemuPrepareHost*Devices()

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

 



No functional changes.
---
 src/qemu/qemu_hostdev.c | 40 ++++++++++++++++++++--------------------
 src/qemu/qemu_hostdev.h | 22 +++++++++++-----------
 src/qemu/qemu_hotplug.c |  9 ++++-----
 3 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 706db0c..a4409d6 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -156,9 +156,9 @@ qemuHostdevHostSupportsPassthroughLegacy(void)
 
 
 static bool
-qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
-                                  size_t nhostdevs,
-                                  virQEMUCapsPtr qemuCaps)
+qemuPrepareHostPCIDevicesCheckSupport(virDomainHostdevDefPtr *hostdevs,
+                                      size_t nhostdevs,
+                                      virQEMUCapsPtr qemuCaps)
 {
     bool supportsPassthroughKVM = qemuHostdevHostSupportsPassthroughLegacy();
     bool supportsPassthroughVFIO = qemuHostdevHostSupportsPassthroughVFIO();
@@ -219,18 +219,18 @@ qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
 }
 
 int
-qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
-                             const char *name,
-                             const unsigned char *uuid,
-                             virDomainHostdevDefPtr *hostdevs,
-                             int nhostdevs,
-                             virQEMUCapsPtr qemuCaps,
-                             unsigned int flags)
+qemuPrepareHostPCIDevices(virQEMUDriverPtr driver,
+                          const char *name,
+                          const unsigned char *uuid,
+                          virDomainHostdevDefPtr *hostdevs,
+                          int nhostdevs,
+                          virQEMUCapsPtr qemuCaps,
+                          unsigned int flags)
 {
     int ret = -1;
     virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
 
-    if (!qemuPrepareHostdevPCICheckSupport(hostdevs, nhostdevs, qemuCaps))
+    if (!qemuPrepareHostPCIDevicesCheckSupport(hostdevs, nhostdevs, qemuCaps))
         goto out;
 
     ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
@@ -254,10 +254,10 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
 }
 
 int
-qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
-                              const char *name,
-                              virDomainHostdevDefPtr *hostdevs,
-                              int nhostdevs)
+qemuPrepareHostSCSIDevices(virQEMUDriverPtr driver,
+                           const char *name,
+                           virDomainHostdevDefPtr *hostdevs,
+                           int nhostdevs)
 {
     size_t i;
     virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
@@ -292,17 +292,17 @@ qemuPrepareHostDevices(virQEMUDriverPtr driver,
     if (!def->nhostdevs)
         return 0;
 
-    if (qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
-                                     def->hostdevs, def->nhostdevs,
-                                     qemuCaps, flags) < 0)
+    if (qemuPrepareHostPCIDevices(driver, def->name, def->uuid,
+                                  def->hostdevs, def->nhostdevs,
+                                  qemuCaps, flags) < 0)
         return -1;
 
     if (qemuPrepareHostUSBDevices(driver, def->name,
                                   def->hostdevs, def->nhostdevs, flags) < 0)
         return -1;
 
-    if (qemuPrepareHostdevSCSIDevices(driver, def->name,
-                                      def->hostdevs, def->nhostdevs) < 0)
+    if (qemuPrepareHostSCSIDevices(driver, def->name,
+                                   def->hostdevs, def->nhostdevs) < 0)
         return -1;
 
     return 0;
diff --git a/src/qemu/qemu_hostdev.h b/src/qemu/qemu_hostdev.h
index 05bd965..af53095 100644
--- a/src/qemu/qemu_hostdev.h
+++ b/src/qemu/qemu_hostdev.h
@@ -35,23 +35,23 @@ int qemuUpdateActiveSCSIHostdevs(virQEMUDriverPtr driver,
                                  virDomainDefPtr def);
 bool qemuHostdevHostSupportsPassthroughLegacy(void);
 bool qemuHostdevHostSupportsPassthroughVFIO(void);
-int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
-                                 const char *name,
-                                 const unsigned char *uuid,
-                                 virDomainHostdevDefPtr *hostdevs,
-                                 int nhostdevs,
-                                 virQEMUCapsPtr qemuCaps,
-                                 unsigned int flags);
+int qemuPrepareHostPCIDevices(virQEMUDriverPtr driver,
+                              const char *name,
+                              const unsigned char *uuid,
+                              virDomainHostdevDefPtr *hostdevs,
+                              int nhostdevs,
+                              virQEMUCapsPtr qemuCaps,
+                              unsigned int flags);
 int
 qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
                           const char *name,
                           virDomainHostdevDefPtr *hostdevs,
                           int nhostdevs,
                           unsigned int flags);
-int qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
-                                  const char *name,
-                                  virDomainHostdevDefPtr *hostdevs,
-                                  int nhostdevs);
+int qemuPrepareHostSCSIDevices(virQEMUDriverPtr driver,
+                               const char *name,
+                               virDomainHostdevDefPtr *hostdevs,
+                               int nhostdevs);
 int qemuPrepareHostDevices(virQEMUDriverPtr driver,
                            virDomainDefPtr def,
                            virQEMUCapsPtr qemuCaps,
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index afc5408..7083abf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1263,11 +1263,11 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
 
     if (!cfg->relaxedACS)
         flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;
-    if (qemuPrepareHostdevPCIDevices(driver, vm->def->name, vm->def->uuid,
-                                     &hostdev, 1, priv->qemuCaps, flags) < 0)
+    if (qemuPrepareHostPCIDevices(driver, vm->def->name, vm->def->uuid,
+                                  &hostdev, 1, priv->qemuCaps, flags) < 0)
         goto cleanup;
 
-    /* this could have been changed by qemuPrepareHostdevPCIDevices */
+    /* this could have been changed by qemuPrepareHostPCIDevices */
     backend = hostdev->source.subsys.u.pci.backend;
 
     switch ((virDomainHostdevSubsysPCIBackendType) backend) {
@@ -1968,8 +1968,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn,
     if (!cont)
         return -1;
 
-    if (qemuPrepareHostdevSCSIDevices(driver, vm->def->name,
-                                      &hostdev, 1)) {
+    if (qemuPrepareHostSCSIDevices(driver, vm->def->name, &hostdev, 1)) {
         virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
         if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) {
             virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc = &scsisrc->u.iscsi;
-- 
2.4.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]