]> git.proxmox.com Git - mirror_qemu.git/commitdiff
file-win32: Error out if locking=on
authorFam Zheng <famz@redhat.com>
Tue, 2 May 2017 16:35:51 +0000 (00:35 +0800)
committerKevin Wolf <kwolf@redhat.com>
Thu, 11 May 2017 09:08:41 +0000 (11:08 +0200)
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 <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/file-win32.c

index d1eb0a14b240d34e20f992ad8079b866ccacad8e..1a35dbabf287c292f95fcd96faad10526d5d8f77 100644 (file)
@@ -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);