Signed-off-by: Shi Lei <shi_lei(a)massclouds.com>
---
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