Re: [libvirt] [PATCH] Make virDomainGetXMLDesc output cache settings even if no special driverName is set
On Mon, Mar 08, 2010 at 09:46:14PM +0100, Soren Hansen wrote: If a special cache strategy for a disk has been specified in a domain definition, but no driverName has been set, virDomainGetXMLDesc will not include the driver tag at all. This patch makes sure that the driver tag is included if any of the settings it can contain has been set. Signed-off-by: Soren Hansen so...@linux2go.dk --- src/conf/domain_conf.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 96ba0b0..56c5239 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4718,8 +4718,10 @@ virDomainDiskDefFormat(virBufferPtr buf, disk type='%s' device='%s'\n, type, device); -if (def-driverName) { -virBufferVSprintf(buf, driver name='%s', def-driverName); +if (def-driverName || def-driverType || def-cachemode) { +virBufferVSprintf(buf, driver); +if (def-driverName) +virBufferVSprintf(buf, name='%s', def-driverName); if (def-driverType) virBufferVSprintf(buf, type='%s', def-driverType); if (def-cachemode) Okay, that looks logical, ACK and pushed, thanks, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ dan...@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] Make virDomainGetXMLDesc output cache settings even if no special driverName is set
If a special cache strategy for a disk has been specified in a domain definition, but no driverName has been set, virDomainGetXMLDesc will not include the driver tag at all. This patch makes sure that the driver tag is included if any of the settings it can contain has been set. Signed-off-by: Soren Hansen so...@linux2go.dk --- src/conf/domain_conf.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 96ba0b0..56c5239 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4718,8 +4718,10 @@ virDomainDiskDefFormat(virBufferPtr buf, disk type='%s' device='%s'\n, type, device); -if (def-driverName) { -virBufferVSprintf(buf, driver name='%s', def-driverName); +if (def-driverName || def-driverType || def-cachemode) { +virBufferVSprintf(buf, driver); +if (def-driverName) +virBufferVSprintf(buf, name='%s', def-driverName); if (def-driverType) virBufferVSprintf(buf, type='%s', def-driverType); if (def-cachemode) -- 1.7.0 signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Make virDomainGetXMLDesc output cache settings even if no special driverName is set
On 03/08/2010 01:46 PM, Soren Hansen wrote: If a special cache strategy for a disk has been specified in a domain definition, but no driverName has been set, virDomainGetXMLDesc will not include the driver tag at all. ... -if (def-driverName) { -virBufferVSprintf(buf, driver name='%s', def-driverName); +if (def-driverName || def-driverType || def-cachemode) { +virBufferVSprintf(buf, driver); +if (def-driverName) +virBufferVSprintf(buf, name='%s', def-driverName); if (def-driverType) ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list