[PATCH 02/10] conf: Rename virDomainHostdevDefAlloc() to virDomainHostdevDefNew()

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

 



All other virDomain*Def follow this naming convention for
their allocation function.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/conf/domain_conf.c        | 4 ++--
 src/conf/domain_conf.h        | 2 +-
 src/libvirt_private.syms      | 2 +-
 src/lxc/lxc_native.c          | 2 +-
 src/qemu/qemu_parse_command.c | 4 ++--
 src/vbox/vbox_common.c        | 2 +-
 src/xenconfig/xen_common.c    | 2 +-
 src/xenconfig/xen_sxpr.c      | 2 +-
 src/xenconfig/xen_xl.c        | 2 +-
 tests/virhostdevtest.c        | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d9aea83..15dd285 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2378,7 +2378,7 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
 
 
 virDomainHostdevDefPtr
-virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt)
+virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt)
 {
     virDomainHostdevDefPtr def = NULL;
 
@@ -13801,7 +13801,7 @@ virDomainHostdevDefParseXML(virDomainXMLOptionPtr xmlopt,
 
     ctxt->node = node;
 
-    if (!(def = virDomainHostdevDefAlloc(xmlopt)))
+    if (!(def = virDomainHostdevDefNew(xmlopt)))
         goto error;
 
     if (mode) {
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 9dc64b2..cbcffa4 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2684,7 +2684,7 @@ void virDomainMemballoonDefFree(virDomainMemballoonDefPtr def);
 void virDomainNVRAMDefFree(virDomainNVRAMDefPtr def);
 void virDomainWatchdogDefFree(virDomainWatchdogDefPtr def);
 void virDomainVideoDefFree(virDomainVideoDefPtr def);
-virDomainHostdevDefPtr virDomainHostdevDefAlloc(virDomainXMLOptionPtr xmlopt);
+virDomainHostdevDefPtr virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt);
 void virDomainHostdevDefClear(virDomainHostdevDefPtr def);
 void virDomainHostdevDefFree(virDomainHostdevDefPtr def);
 void virDomainHubDefFree(virDomainHubDefPtr def);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 888412a..e92fe52 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -366,9 +366,9 @@ virDomainGraphicsVNCSharePolicyTypeFromString;
 virDomainGraphicsVNCSharePolicyTypeToString;
 virDomainHasNet;
 virDomainHostdevCapsTypeToString;
-virDomainHostdevDefAlloc;
 virDomainHostdevDefClear;
 virDomainHostdevDefFree;
+virDomainHostdevDefNew;
 virDomainHostdevFind;
 virDomainHostdevInsert;
 virDomainHostdevModeTypeToString;
diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c
index 8f44168..7bcdf1f 100644
--- a/src/lxc/lxc_native.c
+++ b/src/lxc/lxc_native.c
@@ -394,7 +394,7 @@ lxcCreateNetDef(const char *type,
 static virDomainHostdevDefPtr
 lxcCreateHostdevDef(int mode, int type, const char *data)
 {
-    virDomainHostdevDefPtr hostdev = virDomainHostdevDefAlloc(NULL);
+    virDomainHostdevDefPtr hostdev = virDomainHostdevDefNew(NULL);
 
     if (!hostdev)
         return NULL;
diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index af9063c..90e8d09 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -1162,7 +1162,7 @@ qemuParseCommandLinePCI(const char *val)
     int bus = 0, slot = 0, func = 0;
     const char *start;
     char *end;
-    virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL);
+    virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
 
     if (!def)
         goto error;
@@ -1212,7 +1212,7 @@ qemuParseCommandLinePCI(const char *val)
 static virDomainHostdevDefPtr
 qemuParseCommandLineUSB(const char *val)
 {
-    virDomainHostdevDefPtr def = virDomainHostdevDefAlloc(NULL);
+    virDomainHostdevDefPtr def = virDomainHostdevDefNew(NULL);
     virDomainHostdevSubsysUSBPtr usbsrc;
     int first = 0, second = 0;
     const char *start;
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index c46e71b..92ee371 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -2989,7 +2989,7 @@ vboxHostDeviceGetXMLDesc(vboxDriverPtr data, virDomainDefPtr def, IMachine *mach
         goto release_filters;
 
     for (i = 0; i < def->nhostdevs; i++) {
-        def->hostdevs[i] = virDomainHostdevDefAlloc(NULL);
+        def->hostdevs[i] = virDomainHostdevDefNew(NULL);
         if (!def->hostdevs[i])
             goto release_hostdevs;
     }
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c
index 72ffb30..6d7dc2c 100644
--- a/src/xenconfig/xen_common.c
+++ b/src/xenconfig/xen_common.c
@@ -458,7 +458,7 @@ xenParsePCI(virConfPtr conf, virDomainDefPtr def)
                 goto skippci;
             if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
                 goto skippci;
-            if (!(hostdev = virDomainHostdevDefAlloc(NULL)))
+            if (!(hostdev = virDomainHostdevDefNew(NULL)))
                return -1;
 
             hostdev->managed = false;
diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c
index baa68b1..fefa61a 100644
--- a/src/xenconfig/xen_sxpr.c
+++ b/src/xenconfig/xen_sxpr.c
@@ -1110,7 +1110,7 @@ xenParseSxprPCI(virDomainDefPtr def,
             goto error;
         }
 
-        if (!(dev = virDomainHostdevDefAlloc(NULL)))
+        if (!(dev = virDomainHostdevDefNew(NULL)))
            goto error;
 
         dev->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;
diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c
index cac440c..fa3f1d0 100644
--- a/src/xenconfig/xen_xl.c
+++ b/src/xenconfig/xen_xl.c
@@ -733,7 +733,7 @@ xenParseXLUSB(virConfPtr conf, virDomainDefPtr def)
                 goto skipusb;
             if (virStrToLong_i(device, NULL, 16, &devNum) < 0)
                 goto skipusb;
-            if (!(hostdev = virDomainHostdevDefAlloc(NULL)))
+            if (!(hostdev = virDomainHostdevDefNew(NULL)))
                return -1;
 
             hostdev->managed = false;
diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c
index b3beee9..655991c 100644
--- a/tests/virhostdevtest.c
+++ b/tests/virhostdevtest.c
@@ -87,7 +87,7 @@ myInit(void)
 
     for (i = 0; i < nhostdevs; i++) {
         virDomainHostdevSubsys subsys;
-        hostdevs[i] = virDomainHostdevDefAlloc(NULL);
+        hostdevs[i] = virDomainHostdevDefNew(NULL);
         if (!hostdevs[i])
             goto cleanup;
         hostdevs[i]->mode = VIR_DOMAIN_HOSTDEV_MODE_SUBSYS;
-- 
2.7.5

--
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]
  Powered by Linux