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>
This commit is contained in:
parent
7dc74db88b
commit
d5546c5e77
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user