aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2013-05-02 12:03:09 +0100
committerIan Jackson <Ian.Jackson@eu.citrix.com>2013-05-02 16:19:04 +0100
commitc83107132f1488fc84fe804d3c81bb7c4efa4d6a (patch)
tree9f4582e39ef97f95c9fb3b2f2242cc0905b77eb0
parent63cec00679cc65ab5d5a9447a62d5202f155b78c (diff)
downloadxen-c83107132f1488fc84fe804d3c81bb7c4efa4d6a.tar.gz
xen-c83107132f1488fc84fe804d3c81bb7c4efa4d6a.tar.bz2
xen-c83107132f1488fc84fe804d3c81bb7c4efa4d6a.zip
libxl: Don't use tapdisk for cd-roms
blktap does not support the insert / eject commands, and so is not suitable for cd-roms. This fixes the bug where libxl uses tapdisk as a cdrom back-end, causing subsequent eject / insert commands to fail. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> CC: Fabio Fantoni <fabio.fantoni@heliman.it> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/libxl_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index a826ecef75..a5cf446a24 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -178,6 +178,12 @@ static int disk_try_backend(disk_try_backend_args *a,
case LIBXL_DISK_BACKEND_TAP:
if (a->disk->script) goto bad_script;
+ if (a->disk->is_cdrom) {
+ LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
+ " unsuitable for cdroms",
+ a->disk->vdev);
+ return 0;
+ }
if (!libxl__blktap_enabled(a->gc)) {
LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend tap"
" unsuitable because blktap not available",