diff options
author | Max Reitz <mreitz@redhat.com> | 2014-03-05 22:41:38 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-06 16:18:09 +0100 |
commit | 464d9f641d5a2382bd43d10ae41355edf69338b1 (patch) | |
tree | 91f9e7e903224d840c129c149520924ba75ffb38 /block/raw-posix.c | |
parent | 078896a9eeeaf7c301bbc59fc791c3331324285f (diff) | |
download | hqemu-464d9f641d5a2382bd43d10ae41355edf69338b1.zip hqemu-464d9f641d5a2382bd43d10ae41355edf69338b1.tar.gz |
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: 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>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r-- | block/raw-posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 892145c..e6b4c1f 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -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)) { |