diff options
author | Max Reitz <mreitz@redhat.com> | 2014-03-05 22:41:40 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-06 16:18:12 +0100 |
commit | d5546c5e776ac8f6277ddfdd59df9888e7919c2f (patch) | |
tree | 366aa5450a6ec4918d46ff9cc56b31ec88a348ca /block/raw-win32.c | |
parent | 7dc74db88b1eb3cff12174d0448ecfb6cd0e2469 (diff) | |
download | qemu-d5546c5e776ac8f6277ddfdd59df9888e7919c2f.zip qemu-d5546c5e776ac8f6277ddfdd59df9888e7919c2f.tar.gz qemu-d5546c5e776ac8f6277ddfdd59df9888e7919c2f.tar.bz2 |
block/raw-win32: Strip "file:" prefix on creation
The bdrv_create() implementation of the block/raw-win32 "file" protocol
driver should strip the "file:" prefix from filenames if present.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r-- | block/raw-win32.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c index 0755434..9954748 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -481,6 +481,8 @@ static int raw_create(const char *filename, QEMUOptionParameter *options, int fd; int64_t total_size = 0; + strstart(filename, "file:", &filename); + /* Read out options */ while (options && options->name) { if (!strcmp(options->name, BLOCK_OPT_SIZE)) { |