[PATCH v2 2/5] qemu: hostdev: Unify naming for qemuHostdevPrepare*Devices()

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

 



Adopt the same names used for virHostdevPrepare*Devices() for
consistency's sake and to make it easier to jump between the two.

No functional changes.
---
 src/qemu/qemu_hostdev.c | 38 +++++++++++++++++++-------------------
 src/qemu/qemu_hostdev.h | 24 ++++++++++++------------
 src/qemu/qemu_hotplug.c |  8 ++++----
 src/qemu/qemu_process.c |  4 ++--
 4 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 706db0c..8886407 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)
+qemuHostdevPreparePCIDevicesCheckSupport(virDomainHostdevDefPtr *hostdevs,
+                                         size_t nhostdevs,
+                                         virQEMUCapsPtr qemuCaps)
 {
     bool supportsPassthroughKVM = qemuHostdevHostSupportsPassthroughLegacy();
     bool supportsPassthroughVFIO = qemuHostdevHostSupportsPassthroughVFIO();
@@ -219,7 +219,7 @@ qemuPrepareHostdevPCICheckSupport(virDomainHostdevDefPtr *hostdevs,
 }
 
 int
-qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
+qemuHostdevPreparePCIDevices(virQEMUDriverPtr driver,
                              const char *name,
                              const unsigned char *uuid,
                              virDomainHostdevDefPtr *hostdevs,
@@ -230,7 +230,7 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
     int ret = -1;
     virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
 
-    if (!qemuPrepareHostdevPCICheckSupport(hostdevs, nhostdevs, qemuCaps))
+    if (!qemuHostdevPreparePCIDevicesCheckSupport(hostdevs, nhostdevs, qemuCaps))
         goto out;
 
     ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
@@ -241,11 +241,11 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
 }
 
 int
-qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
-                          const char *name,
-                          virDomainHostdevDefPtr *hostdevs,
-                          int nhostdevs,
-                          unsigned int flags)
+qemuHostdevPrepareUSBDevices(virQEMUDriverPtr driver,
+                             const char *name,
+                             virDomainHostdevDefPtr *hostdevs,
+                             int nhostdevs,
+                             unsigned int flags)
 {
     virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
 
@@ -254,7 +254,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
 }
 
 int
-qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
+qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver,
                               const char *name,
                               virDomainHostdevDefPtr *hostdevs,
                               int nhostdevs)
@@ -284,24 +284,24 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
 
 
 int
-qemuPrepareHostDevices(virQEMUDriverPtr driver,
-                       virDomainDefPtr def,
-                       virQEMUCapsPtr qemuCaps,
-                       unsigned int flags)
+qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
+                                virDomainDefPtr def,
+                                virQEMUCapsPtr qemuCaps,
+                                unsigned int flags)
 {
     if (!def->nhostdevs)
         return 0;
 
-    if (qemuPrepareHostdevPCIDevices(driver, def->name, def->uuid,
+    if (qemuHostdevPreparePCIDevices(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)
+    if (qemuHostdevPrepareUSBDevices(driver, def->name,
+                                     def->hostdevs, def->nhostdevs, flags) < 0)
         return -1;
 
-    if (qemuPrepareHostdevSCSIDevices(driver, def->name,
+    if (qemuHostdevPrepareSCSIDevices(driver, def->name,
                                       def->hostdevs, def->nhostdevs) < 0)
         return -1;
 
diff --git a/src/qemu/qemu_hostdev.h b/src/qemu/qemu_hostdev.h
index 05bd965..e1f7998 100644
--- a/src/qemu/qemu_hostdev.h
+++ b/src/qemu/qemu_hostdev.h
@@ -35,27 +35,27 @@ int qemuUpdateActiveSCSIHostdevs(virQEMUDriverPtr driver,
                                  virDomainDefPtr def);
 bool qemuHostdevHostSupportsPassthroughLegacy(void);
 bool qemuHostdevHostSupportsPassthroughVFIO(void);
-int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
+
+int qemuHostdevPreparePCIDevices(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,
+int qemuHostdevPrepareUSBDevices(virQEMUDriverPtr driver,
+                                 const char *name,
+                                 virDomainHostdevDefPtr *hostdevs,
+                                 int nhostdevs,
+                                 unsigned int flags);
+int qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver,
                                   const char *name,
                                   virDomainHostdevDefPtr *hostdevs,
                                   int nhostdevs);
-int qemuPrepareHostDevices(virQEMUDriverPtr driver,
-                           virDomainDefPtr def,
-                           virQEMUCapsPtr qemuCaps,
-                           unsigned int flags);
+int qemuHostdevPrepareDomainDevices(virQEMUDriverPtr driver,
+                                    virDomainDefPtr def,
+                                    virQEMUCapsPtr qemuCaps,
+                                    unsigned int flags);
 void
 qemuDomainReAttachHostUSBDevices(virQEMUDriverPtr driver,
                                  const char *name,
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 470ab6a..507883c 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,
+    if (qemuHostdevPreparePCIDevices(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 qemuHostdevPreparePCIDevices */
     backend = hostdev->source.subsys.u.pci.backend;
 
     switch ((virDomainHostdevSubsysPCIBackendType) backend) {
@@ -1885,7 +1885,7 @@ qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
     bool teardownlabel = false;
     int ret = -1;
 
-    if (qemuPrepareHostUSBDevices(driver, vm->def->name, &hostdev, 1, 0) < 0)
+    if (qemuHostdevPrepareUSBDevices(driver, vm->def->name, &hostdev, 1, 0) < 0)
         goto cleanup;
 
     added = true;
@@ -1968,7 +1968,7 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn,
     if (!cont)
         return -1;
 
-    if (qemuPrepareHostdevSCSIDevices(driver, vm->def->name,
+    if (qemuHostdevPrepareSCSIDevices(driver, vm->def->name,
                                       &hostdev, 1)) {
         virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
         if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI) {
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 07e41f0..daeeaf2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4490,8 +4490,8 @@ int qemuProcessStart(virConnectPtr conn,
         hostdev_flags |= VIR_HOSTDEV_STRICT_ACS_CHECK;
     if (!migrateFrom)
         hostdev_flags |= VIR_HOSTDEV_COLD_BOOT;
-    if (qemuPrepareHostDevices(driver, vm->def, priv->qemuCaps,
-                               hostdev_flags) < 0)
+    if (qemuHostdevPrepareDomainDevices(driver, vm->def, priv->qemuCaps,
+                                        hostdev_flags) < 0)
         goto cleanup;
 
     VIR_DEBUG("Preparing chr devices");
-- 
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]