Skip to content

Commit

Permalink
qdevices: type of detect-zeroes should be a string
Browse files Browse the repository at this point in the history
values of "detect-zeroes" should be one of ["on", "off", "unmap"]

Signed-off-by: Houqi (Nick) Zuo <[email protected]>
  • Loading branch information
nickzhq committed Jun 26, 2023
1 parent eaaf51e commit d532ac7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virttest/qemu_devices/qdevices.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,10 @@ def _convert_blkdev_args(args):
:rtype: dict
"""
new_args = dict()
keep_original_type = ("detect-zeroes", )
for key, value in six.iteritems(args):
if key in keep_original_type:
continue
if value in ('on', 'yes'):
value = True
elif value in ('off', 'no'):
Expand Down

0 comments on commit d532ac7

Please sign in to comment.