The introduction of APIC EOI patches had a few little details that could look better, so this patch fixes that. The fixes: - "on" and "off" as values are changed to <code>on</code> and <code>off</code> respectively, because the code around uses the same tags for such values. - VIR_FREE is unnecessary as it is done in the error handling as well - one empty line stayed in my local changes not included in the sent patch, the code around is separated in similar fashion - For const strings, virBufferAddLit should be used instead of virBufferAsprintf. --- docs/formatdomain.html.in | 6 +++--- src/conf/domain_conf.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 8bdfbf1..51f897c 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1020,9 +1020,9 @@ </dd> <dt><code>apic</code></dt> <dd>APIC allows the use of programmable IRQ - management. <span class="since">Since 0.10.2 (QEMU only)</span> - there is an optional attribute <code>eoi</code> with values "on" - and "off" which toggles the availability of EOI (End of + management. <span class="since">Since 0.10.2 (QEMU only)</span> there is + an optional attribute <code>eoi</code> with values <code>on</code> + and <code>off</code> which toggles the availability of EOI (End of Interrupt) for the guest. </dd> <dt><code>hap</code></dt> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b8ba0e2..880ac17 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8851,7 +8851,6 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unknown value for attribute eoi: %s"), tmp); - VIR_FREE(tmp); goto error; } def->apic_eoi = eoi; @@ -13433,6 +13432,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, } virBufferAddLit(buf, " <os>\n"); + virBufferAddLit(buf, " <type"); if (def->os.arch) virBufferAsprintf(buf, " arch='%s'", def->os.arch); @@ -13523,7 +13523,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, " eoi='%s'", virDomainApicEoiTypeToString(def->apic_eoi)); } - virBufferAsprintf(buf, "/>\n"); + virBufferAddLit(buf, "/>\n"); } } virBufferAddLit(buf, " </features>\n"); -- 1.7.12 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list