[Libvir] [PATCH] Cut out "type=ioemu" on Xen3.1

Daniel Veillard veillard at redhat.com
Fri Jun 1 14:03:30 UTC 2007


On Fri, Jun 01, 2007 at 07:29:25PM +0900, Saori Fukuta wrote:
> On Fri, 1 Jun 2007 05:47:51 -0400 Daniel Veillard wrote:
> >   okay, the patch looks fine, but what happens when you leave
> > (type ioemu) in 3.1 expressions ? Does it fail ? If it doesn't
> > fail, maybe we can avoid the complexity added by this patch, right ?
> 
> It does not fail on 3.1 even if I remove (type ioemu) because it is 
> not necessary to add specially.

  okay, then there is enough places where we must tweak the code depending
on the version of Xend running, this makes the code harder, less maintainable,
so unless we actually get a problem by still adding this unecessary extra
data, I think it is better to keep the code simpler. I just added a comment
to log that information in the code:

    if (ip != NULL)
        virBufferVSprintf(buf, "(ip '%s')", ip);
    /* apparently not needed any more for xen >= 3.1 but harmless */
    if (hvm)
        virBufferAdd(buf, "(type ioemu)", 12);

  thanks,

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