qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block.c: fix real cdrom detection
@ 2015-06-23 17:56 Programmingkid
  2015-06-23 18:06 ` John Snow
  0 siblings, 1 reply; 30+ messages in thread
From: Programmingkid @ 2015-06-23 17:56 UTC (permalink / raw)
  To: qemu-devel qemu-devel; +Cc: Peter Maydell, John Snow

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

Fix real cdrom detection so that a real cdrom can actually be used.

signed-off-by: John Arbuckle <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


[-- Attachment #2: Type: text/html, Size: 6105 bytes --]

^ permalink raw reply related	[flat|nested] 30+ messages in thread
[parent not found: <3EA68973-F8F2-4262-8EC2-9E12759C9A46@gmail.com>]

end of thread, other threads:[~2015-07-01 16:30 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` [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
     [not found] <3EA68973-F8F2-4262-8EC2-9E12759C9A46@gmail.com>
2015-07-01 16:30 ` Stefan Hajnoczi

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).