Use 'unsigned long long' instead of 'unsigned long' and fix the parser
and formatter.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/domain_conf.c | 4 ++--
src/conf/domain_conf.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2d01693a31..7c6caa01e5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9376,7 +9376,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
if (virDomainNetTeamingInfoParseXML(ctxt, &def->teaming) < 0)
return NULL;
- rv = virXPathULong("string(./tune/sndbuf)", ctxt,
&def->tune.sndbuf);
+ rv = virXPathULongLong("string(./tune/sndbuf)", ctxt,
&def->tune.sndbuf);
if (rv >= 0) {
def->tune.sndbuf_specified = true;
} else if (rv == -2) {
@@ -23585,7 +23585,7 @@ virDomainNetDefFormat(virBuffer *buf,
if (def->tune.sndbuf_specified) {
virBufferAddLit(buf, "<tune>\n");
virBufferAdjustIndent(buf, 2);
- virBufferAsprintf(buf, "<sndbuf>%lu</sndbuf>\n",
def->tune.sndbuf);
+ virBufferAsprintf(buf, "<sndbuf>%llu</sndbuf>\n",
def->tune.sndbuf);
virBufferAdjustIndent(buf, -2);
virBufferAddLit(buf, "</tune>\n");
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index f5825138e7..54dc9098df 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1146,7 +1146,7 @@ struct _virDomainNetDef {
virNetDevVPortProfile *virtPortProfile;
struct {
bool sndbuf_specified;
- unsigned long sndbuf;
+ unsigned long long sndbuf;
} tune;
char *script;
char *downscript;
--
2.37.3