From: "Ross Maxfield" <rmaxfiel@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Missing CDROM media (w/Signed-off-by)
Date: Tue, 11 Apr 2006 09:42:02 -0600 [thread overview]
Message-ID: <443B7878.DD28.00D3.0@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
All,
Being a neophyte to open-source checkins, I apologize for the failure to include the 'Signed-off-by' statement, and resubmit the missing-media patch in conformation.
- Ross
Signed-off-by: Ross Maxfield <rmaxfiel@novell.com>
[-- Attachment #2: xen-missing-media.diff --]
[-- Type: application/octet-stream, Size: 828 bytes --]
Index: xen-3.0-testing/tools/ioemu/vl.c
===================================================================
--- xen-3.0-testing.orig/tools/ioemu/vl.c
+++ xen-3.0-testing/tools/ioemu/vl.c
@@ -3243,8 +3243,17 @@ int main(int argc, char **argv)
/* we always create the cdrom drive, even if no disk is there */
bdrv_init();
if (has_cdrom) {
- bs_table[2] = bdrv_new("cdrom");
- bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
+ int fd;
+ if ( (fd = open(hd_filename[2], O_RDONLY | O_BINARY)) < 0) {
+ fprintf(stderr, "Could not open CD %s.\n", hd_filename[i]);
+ hd_filename[2]=NULL;
+ bs_table[2]=NULL;
+ }
+ else {
+ close(fd);
+ bs_table[2] = bdrv_new("cdrom");
+ bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
+ }
}
/* open the virtual block devices */
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-04-11 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-11 15:42 Ross Maxfield [this message]
2006-04-11 16:00 ` [PATCH] Missing CDROM media (w/Signed-off-by) Anthony Liguori
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=443B7878.DD28.00D3.0@novell.com \
--to=rmaxfiel@novell.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.