From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel@lists.xensource.com
Cc: Ross Maxfield <rmaxfiel@novell.com>
Subject: Re: [Xen-changelog] If the 'cdrom=' option is specified in the definition file but media is
Date: Mon, 10 Apr 2006 13:29:13 -0500 [thread overview]
Message-ID: <443AA3F9.50609@us.ibm.com> (raw)
In-Reply-To: <E1FT0P3-00015M-0U@xenbits.xensource.com>
Xen patchbot -3.0-testing wrote:
> # HG changeset patch
> # User kaf24@firebug.cl.cam.ac.uk
> # Node ID fd526926e0d1c0671295aa7f4b952186c9345173
> # Parent 408f51a850f47af4db20f43f281935909d502511
> If the 'cdrom=' option is specified in the definition file but media is
> not found in the CD drive then main() in vl.c exits and the guest appears
> to hang. This patch modifies vl.c slightly to check for the presents of
> media. If the cdrom cannot be opened then the cd entry is removed from
> hd_filename[] and bs_table[] allowing the guest to continue initializing.
> If the guest requires the CD media then the guest should report, gracefully
> or otherwise, that it's missing.
>
> From: Ross Maxfield <rmaxfiel@novell.com>
>
> Signed-off-by: Keir Fraser <keir@xensource.com>
>
Doesn't this need a Signed-off-by: Ross Maxfield <rmaxfiel@novell.com>?
Regards,
Anthony Liguori
> diff -r 408f51a850f4 -r fd526926e0d1 tools/ioemu/vl.c
> --- a/tools/ioemu/vl.c Mon Apr 10 16:14:36 2006
> +++ b/tools/ioemu/vl.c Mon Apr 10 16:17:07 2006
> @@ -3243,8 +3243,17 @@
> /* 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) {
> + hd_filename[2]=NULL;
> + bs_table[2]=NULL;
> + fprintf(logfile, "Could not open CD %s.\n", hd_filename[i]);
> + }
> + else {
> + close(fd);
> + bs_table[2] = bdrv_new("cdrom");
> + bdrv_set_type_hint(bs_table[2], BDRV_TYPE_CDROM);
> + }
> }
>
> /* open the virtual block devices */
>
> _______________________________________________
> Xen-changelog mailing list
> Xen-changelog@lists.xensource.com
> http://lists.xensource.com/xen-changelog
>
next parent reply other threads:[~2006-04-10 18:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1FT0P3-00015M-0U@xenbits.xensource.com>
2006-04-10 18:29 ` Anthony Liguori [this message]
2006-04-10 19:29 ` Re: [Xen-changelog] If the 'cdrom=' option is specified in the definition file but media is Ewan Mellor
2006-04-10 20:54 ` Anthony Liguori
2006-04-10 21:24 ` Signed-off-by again Hollis Blanchard
2006-04-10 21:32 ` Mike D. Day
2006-04-10 21:33 ` Muli Ben-Yehuda
2006-04-10 23:58 ` Anthony Liguori
2006-04-10 20:56 ` Re: [Xen-changelog] If the 'cdrom=' option is specified in the definition file but media is Mike D. Day
2006-04-10 21:02 ` Anthony Liguori
2006-04-10 23:35 ` 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=443AA3F9.50609@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=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.