From: Anthony PERARD <anthony.perard@citrix.com>
To: Xen Devel <xen-devel@lists.xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH V2 2/3] libxl_dm: Set an id to cdrom drives with qemuu.
Date: Mon, 8 Oct 2012 19:55:21 +0100 [thread overview]
Message-ID: <1349722522-25748-3-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1349722522-25748-1-git-send-email-anthony.perard@citrix.com>
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@citrix.com>
---
tools/libxl/libxl_dm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 054da3e..c036dc1 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -544,11 +544,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,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"
--
Anthony PERARD
next prev parent reply other threads:[~2012-10-08 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 18:55 [PATCH V2 0/3] libxl cd-insert/eject with qemu-xen Anthony PERARD
2012-10-08 18:55 ` [PATCH V2 1/3] libxl_qmp, Introduce libxl__qmp_insert_cdrom Anthony PERARD
2012-10-08 18:55 ` Anthony PERARD [this message]
2012-10-08 18:55 ` [PATCH V2 3/3] libxl: Fix cd-insert with qemu-xen Anthony PERARD
2012-10-09 10:34 ` [PATCH V2 0/3] libxl cd-insert/eject " Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349722522-25748-3-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).