mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
virDomainNetDefFormat: Modernize <tune/> formatting
The <tune/> child element of <interface/> is formatted the old way. Switch to virXMLFormatElement(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
58e0bd73e0
commit
86d10e6259
@ -23993,11 +23993,11 @@ virDomainNetDefFormat(virBuffer *buf,
|
||||
}
|
||||
|
||||
if (def->tune.sndbuf_specified) {
|
||||
virBufferAddLit(buf, "<tune>\n");
|
||||
virBufferAdjustIndent(buf, 2);
|
||||
virBufferAsprintf(buf, "<sndbuf>%llu</sndbuf>\n", def->tune.sndbuf);
|
||||
virBufferAdjustIndent(buf, -2);
|
||||
virBufferAddLit(buf, "</tune>\n");
|
||||
g_auto(virBuffer) sndChildBuf = VIR_BUFFER_INIT_CHILD(buf);
|
||||
|
||||
virBufferAsprintf(&sndChildBuf, "<sndbuf>%llu</sndbuf>\n", def->tune.sndbuf);
|
||||
|
||||
virXMLFormatElement(buf, "tune", NULL, &sndChildBuf);
|
||||
}
|
||||
|
||||
virDomainNetTeamingInfoFormat(def->teaming, buf);
|
||||
|
@ -50,6 +50,9 @@
|
||||
<mac address='52:54:00:e5:48:59'/>
|
||||
<source network='default'/>
|
||||
<model type='virtio'/>
|
||||
<tune>
|
||||
<sndbuf>1600</sndbuf>
|
||||
</tune>
|
||||
<mtu size='9000'/>
|
||||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
||||
</interface>
|
||||
|
Loading…
Reference in New Issue
Block a user