Re: Update XML -> SEXPR conversion for new PVFB syntax

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

 



On Mon, Dec 11, 2006 at 08:58:45PM +0000, Daniel P. Berrange wrote:
> Previously I sent a patch to handle parsing of the new PVFB syntax. This
> patch provides the counterpart - generating the new syntax when creating
> paravirt guests. We only enable the new style syntax if using xendConfigVersion
> 3 or later (ie, 3.0.4), and only for PV guests. HVM and older PV guests still
> use old style syntax.

  okay

> In this I also added support for  vnclisten & vncpasswd parameters mapped
> to the 'listen' and 'passwd' attributes on the XML <graphics> tag.

  right we discussed that before

> RCS file: /data/cvs/libvirt/src/xend_internal.c,v
> retrieving revision 1.80
> diff -u -p -r1.80 xend_internal.c
> --- src/xend_internal.c	7 Dec 2006 18:23:19 -0000	1.80
> +++ src/xend_internal.c	11 Dec 2006 17:36:52 -0000

   XML generation with new graphics data, fine.


> +        if (xmlStrEqual(graphics_type, BAD_CAST "sdl")) {
> +            virBufferAdd(buf, "(type sdl)", 10);
> +            // TODO:
> +            // Need to understand sdl options
> +            //
> +            //virBufferAdd(buf, "(display localhost:10.0)", 24);
> +            //virBufferAdd(buf, "(xauthority /root/.Xauthority)", 30);

  Let's avoid C++ style comments if possible. 

> +    /* New style PVFB config  - 3.0.4 merge */
> +    if (xendConfigVersion >= 3 && !hvm) {
> +        obj = xmlXPathEval(BAD_CAST "/domain/devices/graphics", ctxt);
> +        if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
> +            (obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
> +            for (i = 0; i < obj->nodesetval->nodeNr; i++) {
> +                res = virDomainParseXMLGraphicsDescNew(obj->nodesetval->nodeTab[i], &buf);

  So if using HVM, we still call virDomainParseXMLGraphicsDescOld,
even if using the new interface, maybe the renaming New/Old is not perfect
then, because that's not the only factor in selecting one or the other.
But it's rather a stylistic comment :-)

Daniel

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


[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]