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

block/raw-posix: Strip "file:" prefix on creation



The bdrv_create() implementation of the block/raw-posix "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 078896a9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1241,6 +1241,8 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
    int result = 0;
    int64_t total_size = 0;

    strstart(filename, "file:", &filename);

    /* Read out options */
    while (options && options->name) {
        if (!strcmp(options->name, BLOCK_OPT_SIZE)) {