Skip to content

Commit

Permalink
file-win32: Error out if locking=on
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fam Zheng authored and kevmw committed May 11, 2017
1 parent 16b48d5 commit 1c3a555
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions block/file-win32.c
Expand Up @@ -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);
Expand Down

0 comments on commit 1c3a555

Please sign in to comment.