From 65487c0fc5c1866bbdc397a7fb2e5dff72dc8860 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Wed, 19 Feb 2014 16:22:48 +0200 Subject: [PATCH] conf: re-situate element in This moves the call to virNetDevBandwidthFormat() in virDomainNetDefFormat() to be called right after the call to virNetDevVPortProfileFormat(), so that a single chunk of that function can be placed inside an if that conditionally calls virDomainActualNetDefContentsFormat() instead (next patch). The re-ordering necessitates modifying a couple of test data files. --- src/conf/domain_conf.c | 6 +++--- .../qemuhotplug-console-compat-2+console-virtio.xml | 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml | 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3fc3bdf554..fadcf8b0c2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15599,6 +15599,9 @@ virDomainNetDefFormat(virBufferPtr buf, return -1; if (virNetDevVPortProfileFormat(def->virtPortProfile, buf) < 0) return -1; + if (virNetDevBandwidthFormat(def->bandwidth, buf) < 0) + return -1; + virBufferEscapeString(buf, "