]> xenbits.xensource.com Git - libvirt.git/commitdiff
network_conf: Expose virNetworkDefFormatInternal
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 12 Feb 2014 16:36:35 +0000 (17:36 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 18 Feb 2014 13:46:48 +0000 (14:46 +0100)
In the next patch I'm going to need the network format function that
takes virBuffer as argument. However, slightly change of name is more
appropriate then: virNetworkDefFormatBuf to match the rest of functions
that format an object to buffer.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/network_conf.c
src/conf/network_conf.h
src/libvirt_private.syms

index dd3fa193acce2df5b0a232a73f57b3278e2b1d6a..8b6236d878148a0a29c881bb6aff07ea1134f728 100644 (file)
@@ -2593,10 +2593,10 @@ cleanup:
     return ret;
 }
 
-static int
-virNetworkDefFormatInternal(virBufferPtr buf,
-                            const virNetworkDef *def,
-                            unsigned int flags)
+int
+virNetworkDefFormatBuf(virBufferPtr buf,
+                       const virNetworkDef *def,
+                       unsigned int flags)
 {
     const unsigned char *uuid;
     char uuidstr[VIR_UUID_STRING_BUFLEN];
@@ -2763,7 +2763,7 @@ virNetworkDefFormat(const virNetworkDef *def,
 {
     virBuffer buf = VIR_BUFFER_INITIALIZER;
 
-    if (virNetworkDefFormatInternal(&buf, def, flags) < 0)
+    if (virNetworkDefFormatBuf(&buf, def, flags) < 0)
         goto error;
 
     if (virBufferError(&buf))
@@ -2794,7 +2794,7 @@ virNetworkObjFormat(virNetworkObjPtr net,
     VIR_FREE(class_id);
 
     virBufferAdjustIndent(&buf, 2);
-    if (virNetworkDefFormatInternal(&buf, net->def, flags) < 0)
+    if (virNetworkDefFormatBuf(&buf, net->def, flags) < 0)
         goto error;
 
     virBufferAdjustIndent(&buf, -2);
index b84762a765ed68639a4753ef32e2e6bc517b6ff1..47124ce81825aa1b094c7aed446e400f31de1fc9 100644 (file)
@@ -338,6 +338,9 @@ virNetworkDefPtr virNetworkDefParseFile(const char *filename);
 virNetworkDefPtr virNetworkDefParseNode(xmlDocPtr xml,
                                         xmlNodePtr root);
 char *virNetworkDefFormat(const virNetworkDef *def, unsigned int flags);
+int virNetworkDefFormatBuf(virBufferPtr buf,
+                           const virNetworkDef *def,
+                           unsigned int flags);
 
 static inline const char *
 virNetworkDefForwardIf(const virNetworkDef *def, size_t n)
index eee1df4c7be49c0f6db14a9ee0d7306e587308d3..cd6c87a566b0505398ff6f35fc61b69aa45dd006 100644 (file)
@@ -505,6 +505,7 @@ virNetworkConfigChangeSetup;
 virNetworkConfigFile;
 virNetworkDefCopy;
 virNetworkDefFormat;
+virNetworkDefFormatBuf;
 virNetworkDefFree;
 virNetworkDefGetIpByIndex;
 virNetworkDefParseFile;