[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxl_dm: Set an id to cdrom drives with qemuu.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 10 Oct 2012 22:11:17 +0000
  • Delivery-date: Wed, 10 Oct 2012 22:11:23 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Anthony PERARD <anthony.perard@xxxxxxxxxx>
# Date 1349777300 -3600
# Node ID 754e059217ecc3334c4eb72ca6df851662e942ac
# Parent  694f997be9bfc63a3efe27329c7266dbdf0bf352
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@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 694f997be9bf -r 754e059217ec tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Tue Oct 09 11:08:19 2012 +0100
+++ b/tools/libxl/libxl_dm.c    Tue Oct 09 11:08:20 2012 +0100
@@ -544,11 +544,12 @@ static char ** libxl__build_device_model
             if (disks[i].is_cdrom) {
                 if (disks[i].format == LIBXL_DISK_FORMAT_EMPTY)
                     drive = libxl__sprintf
-                        (gc, "if=ide,index=%d,media=cdrom,cache=writeback", 
disk);
+                        (gc, 
"if=ide,index=%d,media=cdrom,cache=writeback,id=ide-%i",
+                         disk, dev_number);
                 else
                     drive = libxl__sprintf
-                        (gc, 
"file=%s,if=ide,index=%d,media=cdrom,format=%s,cache=writeback",
-                         disks[i].pdev_path, disk, format);
+                        (gc, 
"file=%s,if=ide,index=%d,media=cdrom,format=%s,cache=writeback,id=ide-%i",
+                         disks[i].pdev_path, disk, format, dev_number);
             } else {
                 if (disks[i].format == LIBXL_DISK_FORMAT_EMPTY) {
                     LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "cannot support"

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.