qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creat


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 13/19] block/raw-win32: Strip "file:" prefix on creation
Date: Fri, 7 Mar 2014 14:33:01 +0100

From: Max Reitz <address@hidden>

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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block/raw-win32.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/raw-win32.c b/block/raw-win32.c
index 0755434..9954748 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)) {
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]