From 0d36a5d05a57a7c2c0f6b20c29fcabfe0f0f15c5 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 23 Oct 2014 18:35:57 +0100 Subject: [PATCH] Fix indentation of sysinfo data The data block was indented by 2 spaces too many. This was missed because we never had any test validating the XML formatting. --- src/conf/domain_conf.c | 13 +------------ tests/qemuxml2argvdata/qemuxml2argv-smbios.xml | 2 ++ tests/qemuxml2xmltest.c | 1 + 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 73c199e80b..39befb0c2e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17668,17 +17668,6 @@ virDomainNVRAMDefFormat(virBufferPtr buf, return 0; } -static int -virDomainSysinfoDefFormat(virBufferPtr buf, - virSysinfoDefPtr def) -{ - int ret; - virBufferAdjustIndent(buf, 2); - ret = virSysinfoFormat(buf, def); - virBufferAdjustIndent(buf, -2); - return ret; -} - static int virDomainWatchdogDefFormat(virBufferPtr buf, @@ -18890,7 +18879,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, virDomainResourceDefFormat(buf, def->resource); if (def->sysinfo) - virDomainSysinfoDefFormat(buf, def->sysinfo); + virSysinfoFormat(buf, def->sysinfo); if (def->os.bootloader) { virBufferEscapeString(buf, "%s\n", diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml index 91b2c10cd4..a2caeeaf3f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-smbios.xml @@ -36,6 +36,8 @@
+ + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 978e5f1c6a..0ec4303887 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -405,6 +405,7 @@ mymain(void) DO_TEST("tap-vhost"); DO_TEST("shmem"); + DO_TEST("smbios"); virObjectUnref(driver.caps); virObjectUnref(driver.xmlopt);