debuggers.hg

changeset 22041:be41e8ee8052

tools/libxl: Support pv qemu without any vfbs

Pv qemu provides backends for vfbs and consoles; even if no vfbs are
given can still be useful for the console backends.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
date Mon Aug 16 13:33:54 2010 +0100 (2010-08-16)
parents 2e08ec0028e4
children 1382296539fc
files tools/libxl/libxl.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Mon Aug 16 13:32:04 2010 +0100
     1.2 +++ b/tools/libxl/libxl.c	Mon Aug 16 13:33:54 2010 +0100
     1.3 @@ -2592,17 +2592,20 @@ static int libxl_build_xenpv_qemu_args(l
     1.4      libxl_ctx *ctx = libxl_gc_owner(gc);
     1.5      memset(info, 0x00, sizeof(libxl_device_model_info));
     1.6  
     1.7 -    info->vnc = vfb->vnc;
     1.8 -    if (vfb->vnclisten)
     1.9 -        info->vnclisten = libxl_strdup(gc, vfb->vnclisten);
    1.10 -    info->vncdisplay = vfb->vncdisplay;
    1.11 -    info->vncunused = vfb->vncunused;
    1.12 -    if (vfb->vncpasswd)
    1.13 -        info->vncpasswd = vfb->vncpasswd;
    1.14 -    if (vfb->keymap)
    1.15 -        info->keymap = libxl_strdup(gc, vfb->keymap);
    1.16 -    info->sdl = vfb->sdl;
    1.17 -    info->opengl = vfb->opengl;
    1.18 +    if (vfb != NULL) {
    1.19 +        info->vnc = vfb->vnc;
    1.20 +        if (vfb->vnclisten)
    1.21 +            info->vnclisten = libxl_strdup(gc, vfb->vnclisten);
    1.22 +        info->vncdisplay = vfb->vncdisplay;
    1.23 +        info->vncunused = vfb->vncunused;
    1.24 +        if (vfb->vncpasswd)
    1.25 +            info->vncpasswd = vfb->vncpasswd;
    1.26 +        if (vfb->keymap)
    1.27 +            info->keymap = libxl_strdup(gc, vfb->keymap);
    1.28 +        info->sdl = vfb->sdl;
    1.29 +        info->opengl = vfb->opengl;
    1.30 +    } else
    1.31 +        info->nographic = 1;
    1.32      info->domid = domid;
    1.33      info->dom_name = libxl_domid_to_name(ctx, domid);
    1.34      info->device_model = libxl_abs_path(gc, "qemu-dm", libxl_libexec_path());