All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Programmingkid <programmingkidx@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel qemu-devel <qemu-devel@nongnu.org>,
	Qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection
Date: Tue, 23 Jun 2015 14:06:30 -0400	[thread overview]
Message-ID: <5589A026.5020800@redhat.com> (raw)
In-Reply-To: <3B3C7431-1003-4AAA-90AF-0E1A154DFBE2@gmail.com>



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.

--js

  reply	other threads:[~2015-06-23 18:06 UTC|newest]

Thread overview: 29+ 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 [this message]
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     ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-06-25 15:11       ` Programmingkid
2015-06-26  9:34         ` Stefan Hajnoczi
2015-06-26 15:50           ` Programmingkid
2015-06-26 20:01             ` 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=5589A026.5020800@redhat.com \
    --to=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 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.