From: Stefan Hajnoczi <stefanha@gmail.com>
To: Programmingkid <programmingkidx@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
John Snow <jsnow@redhat.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block.c: fix real cdrom detection
Date: Thu, 25 Jun 2015 14:31:06 +0100 [thread overview]
Message-ID: <20150625133106.GL4419@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <455CF92B-58FA-446D-9EB0-42661C23B739@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]
On Tue, Jun 23, 2015 at 02:26:51PM -0400, Programmingkid wrote:
>
> On Jun 23, 2015, at 2:06 PM, John Snow wrote:
>
> >
> >
> > On 06/23/2015 01:56 PM, Programmingkid wrote:
> >> Fix real cdrom detection so that a real cdrom can actually be used.
> >>
> >> signed-off-by: John Arbuckle <programmingkidx@gmail.com
> >> <mailto:programmingkidx@gmail.com>>
> >>
> >> This patch has been tested on Mac OS X host and guest.
> >> Command used: qemu-system-ppc -cdrom /dev/cdrom
> >>
> >> Note: I was able to view the files using OpenBIOS, but not on
> >> Mac OS X. The size of the disc is reported correctly but some
> >> error happens that prevents it from mounting in Mac OS X. This
> >> is probably another bug with QEMU.
> >>
> >> ---
> >> block.c | 3 ++-
> >> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/block.c b/block.c
> >> index dd4f58d..75ccfad 100644
> >> --- a/block.c
> >> +++ b/block.c
> >> @@ -583,7 +583,8 @@ static int find_image_format(BlockDriverState *bs,
> >> const char *filename,
> >> int ret = 0;
> >>
> >>
> >>
> >> /* Return the raw BlockDriver * to scsi-generic devices or empty
> >> drives */
> >> - if (bs->sg || !bdrv_is_inserted(bs) || bdrv_getlength(bs) == 0) {
> >> + if (bs->sg || !bdrv_is_inserted(bs) || bdrv_getlength(bs) == 0
> >> + || strcmp("/dev/cdrom", filename) == 0) {
> >> *pdrv = &bdrv_raw;
> >> return ret;
> >> }
> >> --
> >> 1.7.5.4
> >>
> >
> > So what's the issue that this patch attempts to fix and how did you
> > determine that the fix was needed here? It doesn't look like it respects
> > proper abstraction at a glance.
>
> Without the patch, QEMU would just quit when the "-cdrom /dev/cdrom" option is given.
Why does it quit?
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-25 13:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 17:56 [Qemu-devel] [PATCH] block.c: fix real cdrom detection Programmingkid
2015-06-23 18:06 ` John Snow
2015-06-23 18:26 ` Programmingkid
2015-06-25 6:53 ` Markus Armbruster
2015-06-25 15:14 ` Programmingkid
2015-06-25 15:32 ` Programmingkid
2015-06-25 15:47 ` Programmingkid
2015-06-25 15:48 ` Paolo Bonzini
2015-06-25 16:12 ` Laurent Vivier
2015-06-25 16:16 ` Paolo Bonzini
2015-06-25 17:19 ` Laurent Vivier
2015-06-26 9:14 ` Laurent Vivier
2015-06-26 9:20 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-06-25 18:07 ` [Qemu-devel] " Programmingkid
2015-06-25 20:51 ` Paolo Bonzini
2015-06-25 17:56 ` Programmingkid
2015-06-25 18:01 ` Paolo Bonzini
2015-06-25 18:01 ` Peter Maydell
2015-06-28 23:43 ` Programmingkid
2015-06-29 0:29 ` Laurent Vivier
2015-06-29 0:56 ` Programmingkid
2015-06-29 3:01 ` Programmingkid
2015-06-29 10:36 ` Laurent Vivier
2015-06-25 17:57 ` Programmingkid
2015-06-25 13:31 ` Stefan Hajnoczi [this message]
2015-06-25 15:11 ` [Qemu-devel] [Qemu-block] " Programmingkid
2015-06-26 9:34 ` Stefan Hajnoczi
2015-06-26 15:50 ` Programmingkid
2015-06-26 20:01 ` Stefan Hajnoczi
[not found] <3EA68973-F8F2-4262-8EC2-9E12759C9A46@gmail.com>
2015-07-01 16:30 ` Stefan Hajnoczi
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=20150625133106.GL4419@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).