Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 2/3] libxl_dm: Set an id to cdrom drives with qemuu.

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


anthony.perard at citrix

Jul 27, 2012, 10:17 AM

Post #1 of 2 (35 views)
Permalink
[PATCH 2/3] libxl_dm: Set an id to cdrom drives with qemuu.

In order to eject and change a cdrom when using qemu-xen, this patch adds an id
the cdrom driver when starting the device model.

Signed-off-by: Anthony PERARD <anthony.perard [at] citrix>
---
tools/libxl/libxl_dm.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index f2e9572..885fc46 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -549,11 +549,12 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
if (disks[i].is_cdrom) {
if (disks[i].format == LIBXL_DISK_FORMAT_EMPTY)
drive = libxl__sprintf
- (gc, "if=ide,index=%d,media=cdrom", disk);
+ (gc, "if=ide,index=%d,media=cdrom,id=ide-%s",
+ disk, disks[i].vdev);
else
drive = libxl__sprintf
- (gc, "file=%s,if=ide,index=%d,media=cdrom,format=%s",
- disks[i].pdev_path, disk, format);
+ (gc, "file=%s,if=ide,index=%d,media=cdrom,format=%s,id=ide-%s",
+ disks[i].pdev_path, disk, format, disks[i].vdev);
} else {
if (disks[i].format == LIBXL_DISK_FORMAT_EMPTY) {
LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "cannot support"
--
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Jul 31, 2012, 5:45 AM

Post #2 of 2 (33 views)
Permalink
Re: [PATCH 2/3] libxl_dm: Set an id to cdrom drives with qemuu. [In reply to]

Anthony PERARD writes ("[PATCH 2/3] libxl_dm: Set an id to cdrom drives with qemuu."):
> In order to eject and change a cdrom when using qemu-xen, this patch
> adds an id the cdrom driver when starting the device model.

> + (gc, "if=ide,index=%d,media=cdrom,id=ide-%s",
> + disk, disks[i].vdev);

You should not use the vdev string for this purpose because several
different vdev strings can refer to the same virtual device.

You should use the dev number instead.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.