[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/3] libxl: Fix cd-insert with qemu-xen.
If qemu-xen is used as a device model, the command to insert, change or eject a cdrom will go through QMP. XenStore is still updated even if QEMU will not read from it. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- tools/libxl/libxl.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 00ddc0e..ed89929 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2167,12 +2167,6 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, rc = ERROR_FAIL; goto out; } - if (dm_ver != LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) { - LOG(ERROR, "cdrom-insert does not work with %s", - libxl_device_model_version_to_string(dm_ver)); - rc = ERROR_INVAL; - goto out; - } disks = libxl_device_disk_list(ctx, domid, &num); for (i = 0; i < num; i++) { @@ -2196,6 +2190,12 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, rc = libxl__device_from_disk(gc, domid, disk, &device); if (rc) goto out; + + if (dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { + rc = libxl__qmp_insert_cdrom(gc, domid, disk); + if (rc) goto out; + } + path = libxl__device_backend_path(gc, &device); insert = flexarray_make(4, 1); -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |