[Libvir] PATCH: Allow emptry bootloader

Daniel Veillard veillard at redhat.com
Sat Sep 29 10:10:40 UTC 2007


On Fri, Sep 28, 2007 at 11:12:41PM +0100, Daniel P. Berrange wrote:
> Latest XenD allows for default bootloader to be used if one is not defined
> for a paravirt OS. libvirt doesn't currently cope with this (see Solaris
> thread), since it requires either a bootloader or kernel to always be
> present.
> 
> The attached patch allows for an emptry bootloader element to indicate that
> the domain should use the default.
> 
> <domain type='xen' id='-1'>
>   <name>rhel5pv</name>
>   <uuid>614d7eb0-c6b1-5235-ac39-361b20f6cd49</uuid>
>   <bootloader/>
>   <os>
>     <type>linux</type>
>   </os>
>    ...snip...
> </domain>
> 
> 
> The current API for looking up nodes in the SEXPR did not allow for the 
> scenario where you might want to lookup a node with no content, eg
> 
>        (bootloader )
> 
> This distinction is needed here, so I added an sexpr_has() method to check
> for this.
> 
> Second, it fixes a long standing bug where we'd record an error about the
> missing kernel or bootloader, but then continue generating (malformed) XML
> anyway. With this patch, it will correctly fail if the empty bootloader
> field is missing from the SEXPR.

  Looks fine to me +1,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/




More information about the libvir-list mailing list