debuggers.hg

diff tools/libxl/libxl.c @ 22468:9ffd785319e0

tools/libxl: use qdisk if blktap2 is not available

Whenever blktap2 is not available use qdisk as block backend instead.

[ This feature will only work with the relevant changesets from
qemu-xen-unstable, recently applied. -iwj ]

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
date Tue Nov 23 19:23:22 2010 +0000 (2010-11-23)
parents c553d3035fd5
children b609b1b983d6
line diff
     1.1 --- a/tools/libxl/libxl.c	Tue Nov 23 19:21:22 2010 +0000
     1.2 +++ b/tools/libxl/libxl.c	Tue Nov 23 19:23:22 2010 +0000
     1.3 @@ -1856,7 +1856,10 @@ int libxl_device_disk_add(libxl_ctx *ctx
     1.4              flexarray_set(back, boffset++, libxl__sprintf(&gc, "%s:%s",
     1.5                            libxl__device_disk_string_of_phystype(disk->phystype), disk->physpath));
     1.6  
     1.7 -            device.backend_kind = DEVICE_TAP;
     1.8 +            if (libxl__blktap_enabled(&gc))
     1.9 +                device.backend_kind = DEVICE_TAP;
    1.10 +            else
    1.11 +                device.backend_kind = DEVICE_QDISK;
    1.12              break;
    1.13  
    1.14          default: