file-win32: Fix "locking" option
commit3b079ac0ffc8e1d9e6528b6e258e7e0d494d9aa0
authorKevin Wolf <kwolf@redhat.com>
Mon, 7 Sep 2020 09:27:39 +0000 (7 11:27 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 Sep 2020 09:11:12 +0000 (10 11:11 +0200)
tree010f2226a721e8bf05363526440f28e391bce088
parentb1cbc33a3971b6bb005d5ac3569feae35a71de0f
file-win32: Fix "locking" option

The intended behaviour was that locking=off/auto work and have no
effect (to remain compatible with file-posix), whereas locking=on would
return an error. Unfortunately, the code forgot to remove "locking" from
the options QDict, so any attempt to use the option would fail.

Replace the option parsing code for "locking" with something that is
part of the raw_runtime_opts QemuOptsList (so it is properly removed
from the QDict) and looks more like file-posix.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200907092739.9988-1-kwolf@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/file-win32.c