[RFC 26/29] conf: Apply virNetworkDNSTxtDefFormatBuf(generated) in virNetworkDNSDefFormat

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

 



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

diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index cd5be22..1d7b854 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -317,6 +317,7 @@
                       {"name": "partialOkay", "type": "Bool"}
                     ]
                   },
+                  "formatfunc": {"output": "src/conf/network_conf"},
                   "members": [
                     {"id": "value", "opt": true}
                   ]
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 19444d6..b40ab4d 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -1970,8 +1970,8 @@ virNetworkDNSDefFormat(virBufferPtr 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]) < 0)
+            return -1;
     }
 
     for (i = 0; i < def->nsrvs; i++) {
-- 
2.17.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