[PATCHv2 11/16] Wrong place for virDomainNetIpsFormat

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

 



---
 src/conf/domain_conf.c | 60 +++++++++++++++++++++++++-------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e1070a6..f9ac1a5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -16021,6 +16021,36 @@ virDomainFSDefFormat(virBufferPtr buf,
     return 0;
 }
 
+static void
+virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
+{
+    size_t i;
+
+    /* Output IP addresses */
+    for (i = 0; i < nips; i++) {
+        virBufferAsprintf(buf, "<ip address='%s'",
+                          ips[i]->address);
+        if (ips[i]->prefix != 0)
+            virBufferAsprintf(buf, " prefix='%u'", ips[i]->prefix);
+        virBufferAddLit(buf, "/>\n");
+    }
+}
+
+static void
+virDomainNetGatewayFormat(virBufferPtr buf,
+                          const char* gateway_ipv4,
+                          const char* gateway_ipv6)
+{
+    if (gateway_ipv4 || gateway_ipv6) {
+        virBufferAddLit(buf, "<gateway");
+        if (gateway_ipv4)
+            virBufferAsprintf(buf, " ipv4='%s'", gateway_ipv4);
+        if (gateway_ipv6)
+            virBufferAsprintf(buf, " ipv6='%s'", gateway_ipv6);
+        virBufferAddLit(buf, "/>\n");
+    }
+}
+
 static int
 virDomainHostdevDefFormatSubsys(virBufferPtr buf,
                                 virDomainHostdevDefPtr def,
@@ -16144,36 +16174,6 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf,
     return 0;
 }
 
-static void
-virDomainNetIpsFormat(virBufferPtr buf, virDomainNetIpDefPtr *ips, size_t nips)
-{
-    size_t i;
-
-    /* Output IP addresses */
-    for (i = 0; i < nips; i++) {
-        virBufferAsprintf(buf, "<ip address='%s'",
-                          ips[i]->address);
-        if (ips[i]->prefix != 0)
-            virBufferAsprintf(buf, " prefix='%u'", ips[i]->prefix);
-        virBufferAddLit(buf, "/>\n");
-    }
-}
-
-static void
-virDomainNetGatewayFormat(virBufferPtr buf,
-                          const char* gateway_ipv4,
-                          const char* gateway_ipv6)
-{
-    if (gateway_ipv4 || gateway_ipv6) {
-        virBufferAddLit(buf, "<gateway");
-        if (gateway_ipv4)
-            virBufferAsprintf(buf, " ipv4='%s'", gateway_ipv4);
-        if (gateway_ipv6)
-            virBufferAsprintf(buf, " ipv6='%s'", gateway_ipv6);
-        virBufferAddLit(buf, "/>\n");
-    }
-}
-
 static int
 virDomainHostdevDefFormatCaps(virBufferPtr buf,
                               virDomainHostdevDefPtr def)
-- 
1.8.4.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]