[Top][All Lists]

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

[Qemu-block] [PULL 16/58] file-win32: Error out if locking=on

From: Kevin Wolf
Subject: [Qemu-block] [PULL 16/58] file-win32: Error out if locking=on
Date: Thu, 11 May 2017 16:32:19 +0200

From: Fam Zheng <address@hidden>

We share the same set of QAPI options with file-posix, but locking is
not supported here. So error out if it is specified as 'on' for now.

Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
 block/file-win32.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/block/file-win32.c b/block/file-win32.c
index d1eb0a1..1a35dba 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -344,6 +344,11 @@ static int raw_open(BlockDriverState *bs, QDict *options, 
int flags,
         goto fail;
+    if (qdict_get_try_bool(options, "locking", false)) {
+        error_setg(errp, "locking=on is not supported on Windows");
+        goto fail;
+    }
     filename = qemu_opt_get(opts, "filename");
     use_aio = get_aio_option(opts, flags, &local_err);

reply via email to

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