aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-03-05 22:41:40 +0100
committerKevin Wolf <kwolf@redhat.com>2014-03-06 16:18:12 +0100
commitd5546c5e776ac8f6277ddfdd59df9888e7919c2f (patch)
tree366aa5450a6ec4918d46ff9cc56b31ec88a348ca
parent7dc74db88b1eb3cff12174d0448ecfb6cd0e2469 (diff)
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>
-rw-r--r--block/raw-win32.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 0755434732..99547488e4 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)) {