[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection |
Date: |
Tue, 23 Jun 2015 14:06:30 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
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 <address@hidden
> <mailto:address@hidden>>
>
> 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
- [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Programmingkid, 2015/06/23
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection,
John Snow <=
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Programmingkid, 2015/06/23
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Markus Armbruster, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Programmingkid, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Programmingkid, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Programmingkid, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Paolo Bonzini, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Laurent Vivier, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Paolo Bonzini, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Laurent Vivier, 2015/06/25
- Re: [Qemu-devel] [PATCH] block.c: fix real cdrom detection, Laurent Vivier, 2015/06/26