aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-05-03 00:35:51 +0800
committerKevin Wolf <kwolf@redhat.com>2017-05-11 11:08:41 +0200
commit1c3a555c35f2124d45a295eb715e50512526810e (patch)
tree757f08c9a23d47881e79b791a1098ba1a99fdea7 /block
parent16b48d5d66d2fceb86114b28d693aad930f5070d (diff)
file-win32: Error out if locking=on
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>
Diffstat (limited to 'block')
-rw-r--r--block/file-win32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/file-win32.c b/block/file-win32.c
index d1eb0a14b2..1a35dbabf2 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);