diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2010-11-30 15:14:14 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-14 15:44:21 +0100 |
commit | 16905d717507d3daffa714c7f0fd5403873807b2 (patch) | |
tree | ba841b455c5ea1e73b973d94073915ee687c5364 | |
parent | 36888c6335422f07bbc50bf3443a39f24b90c7c6 (diff) | |
download | qemu-16905d717507d3daffa714c7f0fd5403873807b2.tar.gz qemu-16905d717507d3daffa714c7f0fd5403873807b2.tar.bz2 qemu-16905d717507d3daffa714c7f0fd5403873807b2.zip |
block: Make bdrv_create_file() ':' handling consistent
Filenames may start with "<protocol>:" to explicitly use a protocol like
nbd. Filenames with unknown protocols are rejected in most of QEMU
except for bdrv_create_file(). Even if a file with an invalid filename
can be created, QEMU cannot use it since all the other relevant
functions reject such paths. Make bdrv_create_file() consistent.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -215,7 +215,7 @@ int bdrv_create_file(const char* filename, QEMUOptionParameter *options) drv = bdrv_find_protocol(filename); if (drv == NULL) { - drv = bdrv_find_format("file"); + return -ENOENT; } return bdrv_create(drv, filename, options); |