[libvirt] PATCH: Fix XM driver handling of disks without source file
Daniel Veillard
veillard at redhat.com
Thu Nov 27 12:30:07 UTC 2008
On Thu, Nov 27, 2008 at 12:20:26PM +0000, Daniel P. Berrange wrote:
> It is possible for disks to be listed without a source file against
> them, eg a CDROM device with no media loaded. The XenD driver handles
> this, but the XM driver incorrectly generates XML with a <source file=''/>
> element instead of omitting the element entirely. This causes a bogus
> SXEXPR to be sent to XenD when starting the domain. This patch does
> three things
>
> - Makes the generic domain_conf.c XML parser accept XML docs with
> a bogus <source file=''/> and convert the source to NULL, instead
> of passing along the empty string "". This protects against broken
> apps
>
> - Makes the XM driver correctly generate XML in the first place,
> so omitting the <source> tag entirely. This is the root cause fix
>
> - Adds a test case for the XM driver to validate handling of devices
> with a source file
sounds and looks fine by me,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list