[PATCH v13 42/49] rename some function names to keep consistency

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

 



Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
---
 src/libvirt_private.syms |    8 +++---
 src/qemu/qemu_hostdev.c  |   16 +++++++-------
 src/util/virhostdev.c    |   52 +++++++++++++++++++++++-----------------------
 src/util/virhostdev.h    |   40 +++++++++++++++++-----------------
 4 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index c924854..a604c54 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1296,10 +1296,10 @@ virHostdevManagerGetDefault;
 virHostdevPciNodeDeviceDetach;
 virHostdevPciNodeDeviceReAttach;
 virHostdevPciNodeDeviceReset;
-virHostdevPreparePCIDevices;
-virHostdevPrepareSCSIDevices;
-virHostdevPrepareUSBDevices;
-virHostdevReAttachPCIDevices;
+virHostdevPreparePciHostdevs;
+virHostdevPrepareScsiHostdevs;
+virHostdevPrepareUsbHostdevs;
+virHostdevReAttachPciHostdevs;
 virHostdevReAttachScsiHostdevs;
 virHostdevReAttachUsbHostdevs;
 virHostdevUpdateActivePciHostdevs;
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index b8d914a..8b67b88 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -237,8 +237,8 @@ qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
     if (hostdev_mgr == NULL)
         goto out;
 
-    ret = virHostdevPreparePCIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
-                                      name, uuid, hostdevs,
+    ret = virHostdevPreparePciHostdevs(hostdev_mgr, QEMU_DRIVER_NAME,
+                                       name, uuid, hostdevs,
                                       nhostdevs, flags);
 
 out:
@@ -259,8 +259,8 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
     if (hostdev_mgr == NULL)
         return -1;
 
-    return virHostdevPrepareUSBDevices(hostdev_mgr, QEMU_DRIVER_NAME, dom_name,
-                                       hostdevs, nhostdevs, flags);
+    return virHostdevPrepareUsbHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, dom_name,
+                                        hostdevs, nhostdevs, flags);
 }
 
 int
@@ -292,8 +292,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
             return -1;
     }
 
-    return virHostdevPrepareSCSIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
-                                        name, hostdevs, nhostdevs);
+    return virHostdevPrepareScsiHostdevs(hostdev_mgr, QEMU_DRIVER_NAME,
+                                         name, hostdevs, nhostdevs);
 }
 
 
@@ -335,8 +335,8 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
     if (hostdev_mgr == NULL)
         goto out;
 
-    virHostdevReAttachPCIDevices(hostdev_mgr, QEMU_DRIVER_NAME, name,
-                                 hostdevs, nhostdevs, oldStateDir);
+    virHostdevReAttachPciHostdevs(hostdev_mgr, QEMU_DRIVER_NAME, name,
+                                  hostdevs, nhostdevs, oldStateDir);
 
 out:
     virObjectUnref(cfg);
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index 9cd11d4..1ee44cf 100644
--- a/src/util/virhostdev.c
+++ b/src/util/virhostdev.c
@@ -427,13 +427,13 @@ virHostdevNetConfigRestore(virDomainHostdevDefPtr hostdev,
 }
 
 int
-virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
-                            const char *drv_name,
-                            const char *dom_name,
-                            const unsigned char *uuid,
-                            virDomainHostdevDefPtr *hostdevs,
-                            int nhostdevs,
-                            unsigned int flags)
+virHostdevPreparePciHostdevs(virHostdevManagerPtr hostdev_mgr,
+                             const char *drv_name,
+                             const char *dom_name,
+                             const unsigned char *uuid,
+                             virDomainHostdevDefPtr *hostdevs,
+                             int nhostdevs,
+                             unsigned int flags)
 {
     virPCIDeviceListPtr pcidevs = NULL;
     int last_processed_hostdev_vf = -1;
@@ -665,12 +665,12 @@ qemuReattachPciDevice(virPCIDevicePtr dev, virHostdevManagerPtr mgr)
  * For upgrade purpose: see virHostdevNetConfigRestore
  */
 void
-virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr,
-                             const char *drv_name,
-                             const char *dom_name,
-                             virDomainHostdevDefPtr *hostdevs,
-                             int nhostdevs,
-                             char *oldStateDir)
+virHostdevReAttachPciHostdevs(virHostdevManagerPtr hostdev_mgr,
+                              const char *drv_name,
+                              const char *dom_name,
+                              virDomainHostdevDefPtr *hostdevs,
+                              int nhostdevs,
+                              char *oldStateDir)
 {
     virPCIDeviceListPtr pcidevs;
     size_t i;
@@ -1050,12 +1050,12 @@ out:
 }
 
 int
-virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
-                            const char *drv_name,
-                            const char *dom_name,
-                            virDomainHostdevDefPtr *hostdevs,
-                            int nhostdevs,
-                            unsigned int flags)
+virHostdevPrepareUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
+                             const char *drv_name,
+                             const char *dom_name,
+                             virDomainHostdevDefPtr *hostdevs,
+                             int nhostdevs,
+                             unsigned int flags)
 {
     size_t i;
     int ret = -1;
@@ -1066,7 +1066,7 @@ virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
     /* To prevent situation where USB device is assigned to two domains
      * we need to keep a list of currently assigned USB devices.
      * This is done in several loops which cannot be joined into one big
-     * loop. See qemuPrepareHostdevPCIDevices()
+     * loop. See virHostdevPrepareHostdevPciHostdevs()
      */
     if (!(list = virUSBDeviceListNew()))
         goto cleanup;
@@ -1121,11 +1121,11 @@ cleanup:
 }
 
 int
-virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
-                             const char *drv_name,
-                             const char *dom_name,
-                             virDomainHostdevDefPtr *hostdevs,
-                             int nhostdevs)
+virHostdevPrepareScsiHostdevs(virHostdevManagerPtr hostdev_mgr,
+                              const char *drv_name,
+                              const char *dom_name,
+                              virDomainHostdevDefPtr *hostdevs,
+                              int nhostdevs)
 {
     size_t i, j;
     int count;
@@ -1135,7 +1135,7 @@ virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
     /* To prevent situation where SCSI device is assigned to two domains
      * we need to keep a list of currently assigned SCSI devices.
      * This is done in several loops which cannot be joined into one big
-     * loop. See qemuPrepareHostdevPCIDevices()
+     * loop. See virHostdevPrepareHostdevPciHostdevs()
      */
     if (!(list = virSCSIDeviceListNew()))
         goto cleanup;
diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h
index 3e8ca6d..bdfc908 100644
--- a/src/util/virhostdev.h
+++ b/src/util/virhostdev.h
@@ -51,33 +51,33 @@ struct _virHostdevManager{
 
 virHostdevManagerPtr virHostdevManagerGetDefault(void);
 int
-virHostdevPreparePCIDevices(virHostdevManagerPtr hostdev_mgr,
-                            const char *drv_name,
-                            const char *dom_name,
-                            const unsigned char *uuid,
-                            virDomainHostdevDefPtr *hostdevs,
-                            int nhostdevs,
-                            unsigned int flags);
-int
-virHostdevPrepareUSBDevices(virHostdevManagerPtr hostdev_mgr,
-                            const char *drv_name,
-                            const char *dom_name,
-                            virDomainHostdevDefPtr *hostdevs,
-                            int nhostdevs,
-                            unsigned int flags);
-int
-virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
+virHostdevPreparePciHostdevs(virHostdevManagerPtr hostdev_mgr,
                              const char *drv_name,
                              const char *dom_name,
+                             const unsigned char *uuid,
                              virDomainHostdevDefPtr *hostdevs,
-                             int nhostdevs);
-void
-virHostdevReAttachPCIDevices(virHostdevManagerPtr hostdev_mgr,
+                             int nhostdevs,
+                             unsigned int flags);
+int
+virHostdevPrepareUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
                              const char *drv_name,
                              const char *dom_name,
                              virDomainHostdevDefPtr *hostdevs,
                              int nhostdevs,
-                             char *oldStateDir);
+                             unsigned int flags);
+int
+virHostdevPrepareScsiHostdevs(virHostdevManagerPtr hostdev_mgr,
+                              const char *drv_name,
+                              const char *dom_name,
+                              virDomainHostdevDefPtr *hostdevs,
+                              int nhostdevs);
+void
+virHostdevReAttachPciHostdevs(virHostdevManagerPtr hostdev_mgr,
+                              const char *drv_name,
+                              const char *dom_name,
+                              virDomainHostdevDefPtr *hostdevs,
+                              int nhostdevs,
+                              char *oldStateDir);
 void
 virHostdevReAttachUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
                               const char *drv_name,
-- 
1.6.0.2

--
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]