mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +00:00
Fix virDomainGetXMLDesc cache settings output
If a special cache strategy for a disk has been specified in a domain definition, but no driverName has been set, virDomainGetXMLDesc would not include the <driver> tag at all. * src/conf/domain_conf.c: make sure any <driver> tag setting is serialized if set.
This commit is contained in:
parent
785d8580b3
commit
1c36d0682a
@ -4718,8 +4718,10 @@ virDomainDiskDefFormat(virBufferPtr buf,
|
|||||||
" <disk type='%s' device='%s'>\n",
|
" <disk type='%s' device='%s'>\n",
|
||||||
type, device);
|
type, device);
|
||||||
|
|
||||||
if (def->driverName) {
|
if (def->driverName || def->driverType || def->cachemode) {
|
||||||
virBufferVSprintf(buf, " <driver name='%s'", def->driverName);
|
virBufferVSprintf(buf, " <driver");
|
||||||
|
if (def->driverName)
|
||||||
|
virBufferVSprintf(buf, " name='%s'", def->driverName);
|
||||||
if (def->driverType)
|
if (def->driverType)
|
||||||
virBufferVSprintf(buf, " type='%s'", def->driverType);
|
virBufferVSprintf(buf, " type='%s'", def->driverType);
|
||||||
if (def->cachemode)
|
if (def->cachemode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user