Kevin Wolf c2ad1b0c46 block: Allow omitting the file name when using driver-specific options
After this patch, using -drive with an empty file name continues to open
the file if driver-specific options are used. If no driver-specific
options are specified, the semantics stay as it was: It defines a drive
without an inserted medium.

In order to achieve this, bdrv_open() must be made safe to work with a
NULL filename parameter. The assumption that is made is that only block
drivers which implement bdrv_parse_filename() support using driver
specific options and could therefore work without a filename. These
drivers must make sure to cope with NULL in their implementation of
.bdrv_open() (this is only NBD for now). For all other drivers, the
block layer code will make sure to error out before calling into their
code - they can't possibly work without a filename.

Now an NBD connection can be opened like this:

  qemu-system-x86_64 -drive file.driver=nbd,file.port=1234,file.host=::1

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2013-03-22 17:51:32 +01:00
2013-03-15 16:41:58 +00:00
2012-12-19 08:29:06 +01:00
2013-03-18 10:21:56 +01:00
2012-10-24 10:26:22 +02:00
2013-03-15 16:07:49 +01:00
2013-03-04 09:54:17 +01:00
2013-03-22 17:51:31 +01:00
2012-09-07 09:02:44 +03:00
2013-02-21 10:38:07 +01:00
2012-11-01 13:10:06 +01:00
…
2013-02-21 16:17:31 -06:00
2013-03-11 13:32:03 +01:00
2012-05-14 07:27:24 +02:00
…
…
2013-03-12 10:35:55 +01:00
2013-02-16 14:50:59 +01:00
2013-03-12 13:40:11 -05:00
2013-03-12 13:40:11 -05:00
2013-02-21 16:17:31 -06:00
…
2013-03-08 21:17:46 +01:00
2013-03-15 11:36:49 -05:00
2013-02-16 11:12:13 +00:00
2013-03-11 13:32:03 +01:00
2013-03-19 07:52:10 -05:00
2013-03-22 17:51:32 +01:00
2013-03-11 13:32:03 +01:00
2013-02-22 21:21:10 +01:00
2013-02-22 21:29:43 +01:00
…
2013-02-18 08:39:10 -06:00
…
2013-02-15 17:40:56 -06:00
2013-03-19 08:00:10 -05:00

Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
715 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%