]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
libxl: initialize vfb defbools in libxlMakeVfb
authorOlaf Hering <olaf@aepfle.de>
Fri, 17 Apr 2015 17:19:31 +0000 (17:19 +0000)
committerJim Fehlig <jfehlig@suse.com>
Fri, 24 Apr 2015 19:17:36 +0000 (13:17 -0600)
If the domU configu has sdl enabled libvirtd crashes:
libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val:
Assertion `!libxl_defbool_is_default(db)' failed.

Initialize the relevant defbool variables in libxl_device_vfb.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Jim Fehlig <jfehlig@suse.com>
src/libxl/libxl_conf.c

index 1b504faf2d42f4fdf6c40f0d0cfdc47d11e0a409..55bd21b8d4a6a2a1f1798129a88f6f4da110a063 100644 (file)
@@ -1242,6 +1242,7 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
     switch (l_vfb->type) {
         case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
             libxl_defbool_set(&x_vfb->sdl.enable, 1);
+            libxl_defbool_set(&x_vfb->vnc.enable, 0);
             if (VIR_STRDUP(x_vfb->sdl.display, l_vfb->data.sdl.display) < 0)
                 return -1;
             if (VIR_STRDUP(x_vfb->sdl.xauthority, l_vfb->data.sdl.xauth) < 0)
@@ -1249,6 +1250,7 @@ libxlMakeVfb(virPortAllocatorPtr graphicsports,
             break;
         case  VIR_DOMAIN_GRAPHICS_TYPE_VNC:
             libxl_defbool_set(&x_vfb->vnc.enable, 1);
+            libxl_defbool_set(&x_vfb->sdl.enable, 0);
             /* driver handles selection of free port */
             libxl_defbool_set(&x_vfb->vnc.findunused, 0);
             if (l_vfb->data.vnc.autoport) {