Commit d5546c5e authored by Max Reitz's avatar Max Reitz Committed by Kevin Wolf
Browse files

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: default avatarMax Reitz <mreitz@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarBenoit Canet <benoit@irqsave.net>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 7dc74db8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)) {