From d5546c5e776ac8f6277ddfdd59df9888e7919c2f Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 5 Mar 2014 22:41:40 +0100 Subject: [PATCH] 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 Reviewed-by: Eric Blake Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- block/raw-win32.c | 2 ++ 1 file changed, 2 insertions(+) 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)) { -- GitLab