]> git.proxmox.com Git - qemu.git/commitdiff
raw-posix: Fix /dev/cdrom magic on OS X
authorKevin Wolf <kwolf@redhat.com>
Tue, 11 Jun 2013 08:44:58 +0000 (10:44 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 12 Aug 2013 22:17:02 +0000 (17:17 -0500)
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.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit a5c5ea3f60c000bf18c99435439533728a5f34a2)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/raw-posix.c

index c0ccf273a3cde91dfb49b6a7513eec81eb82cc3c..90ce9f86af9e63fdf3aeb26892bee1e893361cdf 100644 (file)
@@ -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 )