[RFCv3 13/25] conf: Generate virNetworkDNSTxtDefFormatBuf

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

 



Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx>
---
 src/conf/network_conf.c | 4 ++--
 src/conf/network_conf.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index a6c2f11a..bb976a78 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -2199,8 +2199,8 @@ virNetworkDNSDefFormat(virBuffer *buf,
     }
 
     for (i = 0; i < def->ntxts; i++) {
-        virBufferEscapeString(buf, "<txt name='%s' ", def->txts[i].name);
-        virBufferEscapeString(buf, "value='%s'/>\n", def->txts[i].value);
+        if (virNetworkDNSTxtDefFormatBuf(buf, "txt", &def->txts[i], def, NULL) < 0)
+            return -1;
     }
 
     for (i = 0; i < def->nsrvs; i++) {
diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h
index f5720e5e..a4c83b46 100644
--- a/src/conf/network_conf.h
+++ b/src/conf/network_conf.h
@@ -125,7 +125,7 @@ struct _virNetworkDHCPHostDef {
 };
 
 typedef struct _virNetworkDNSTxtDef virNetworkDNSTxtDef;
-struct _virNetworkDNSTxtDef {   /* genparse */
+struct _virNetworkDNSTxtDef {   /* genparse, genformat */
     char *name;                 /* xmlattr, required */
     char *value;                /* xmlattr */
 };
-- 
2.25.1





[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