Re: [libvirt] PATCH: Support bootloaders in QEMU driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 15, 2008 at 11:09:13AM -0400, Daniel Veillard wrote:
> On Tue, May 13, 2008 at 12:31:36AM +0100, Daniel P. Berrange wrote:
> > The QEMU driver supports booting Xen guests via the Xenner hypervisor.  For
> > such paravirtualized guests there is no regular BIOS, so the bootloader has
> > to be run on the host. Xenner defaults  to pygrub, but since libvirt has a
> > generic syntax for bootloaders, we should use it. So this patch adds support
> > for the <bootloader> syntax in the QEMU drive, and passes this to Xenner via
> > the -bootloader arg.
> > 
> > The patch is overly large, because when we have a bootloader we need to skip
> > the kernel/initrd/cmdline/boot elements & thus caused alot of intrusive code
> > re-indentation .
> [...]
> >  
> >      /* Extract OS type info */
> >      obj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1])", ctxt);
> >      if ((obj == NULL) || (obj->type != XPATH_STRING) ||
> >          (obj->stringval == NULL) || (obj->stringval[0] == 0)) {
> > +        if (!def->os.type[0]) {
> > +            qemudReportError(conn, NULL, NULL, VIR_ERR_OS_TYPE,
> > +                             "%s", _("no OS type"));
> > +            goto error;
> > +        }
> > +    } else {
> > +        strcpy(def->os.type, (const char *)obj->stringval);
> > +        xmlXPathFreeObject(obj);
> > +    }
> 
>   Argh, that part of the code has not been cleaned up, using virXPathString
> there would make this way easier to read and check.

Yes, that's something that needs to be sorted out.

>   The big indentation block change inflated the patch size a bit. it still
> look fine.

This is applied too now.

Regards,
Dan
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]