raw-posix: Fix /dev/cdrom magic on OS X
PATCH 1/1 raw-posix: Fix /dev/cdrom magic on OS X
The raw-posix driver has code to provide a /dev/cdrom on OS X even though it doesn't really exist. However, since commit c66a6157 the real filename is dismissed after finding it, so opening /dev/cdrom fails. Put the filename back into the options QDict to make this work again.
--- block/raw-posix.c | 1 + 1 file changed, 1 insertion(+)
block/raw-posix.c +1 -0
@@ -1350,6 +1350,7 @@ static int hdev_open(BlockDriverState *bs, QDict *options, int flags)qemu_close (fd); } filename = bsdPath; +qdict_put (options,"filename" ,qstring_from_str (filename)); }if ( mediaIterator )
Signature · 1 line
1.8.1.4
Quoted 10 lines · Kevin Wolf
The raw-posix driver has code to provide a
/dev/cdromon OS X even though it doesn't really exist. However, since commitc66a6157the real filename is dismissed after finding it, so opening/dev/cdromfails. Put the filename back into the options QDict to make this work again.Signed-off-by Kevin Wolf <[email protected]>--- block/raw-posix.c | 1 + 1 file changed, 1 insertion(+)
Am 12.06.2013 16:22, schrieb Kevin Wolf:
Quoted 16 lines
The raw-posix driver has code to provide a
/dev/cdromon OS X even though it doesn't really exist. However, since commitc66a6157the real filename is dismissed after finding it, so opening/dev/cdromfails. Put the filename back into the options QDict to make this work again.Signed-off-by Kevin Wolf <[email protected]>--- block/raw-posix.c | 1 + 1 file changed, 1 insertion(+)block/raw-posix.c +0
-0
block/raw-posix.c static int hdev_open(BlockDriverState *bs, QDict *options, int flags) · line 1356
Quoted 7 lines
block/raw-posix.c +1
-0@@ -1350,6 +1350,7 @@ static int hdev_open(BlockDriverState *bs, QDict *options, int flags)qemu_close (fd); } filename = bsdPath; +qdict_put (options,"filename" ,qstring_from_str (filename)); }if ( mediaIterator )
On Mac OS X v10.5.8 ppc64 I get:
qemu-system-x86_64: -cdrom /dev/cdrom: could not open disk image /dev/cdrom: No such file or directory
On ppc I get a crash even without options, seems unrelated though.
Andreas