[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [RFC 2/7] block: Let change-medium add detect-zeroes as boo
From: |
Max Reitz |
Subject: |
[Qemu-block] [RFC 2/7] block: Let change-medium add detect-zeroes as bool |
Date: |
Wed, 2 May 2018 23:32:14 +0200 |
There is no reason to use the wrong type here.
Signed-off-by: Max Reitz <address@hidden>
---
blockdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index c31bf3d98d..76f811c415 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2654,7 +2654,7 @@ void qmp_blockdev_change_medium(bool has_device, const
char *device,
options = qdict_new();
detect_zeroes = blk_get_detect_zeroes_from_root_state(blk);
- qdict_put_str(options, "detect-zeroes", detect_zeroes ? "on" : "off");
+ qdict_put_bool(options, "detect-zeroes", detect_zeroes);
if (has_format) {
qdict_put_str(options, "driver", format);
--
2.14.3
- [Qemu-block] [RFC 0/7] block: Try to use correctly typed blockdev options, Max Reitz, 2018/05/02
- [Qemu-block] [RFC 1/7] qdict: Add qdict_set_default_bool(), Max Reitz, 2018/05/02
- [Qemu-block] [RFC 2/7] block: Let change-medium add detect-zeroes as bool,
Max Reitz <=
- [Qemu-block] [RFC 4/7] block: Add bdrv_open_string_opts(), Max Reitz, 2018/05/02
- [Qemu-block] [RFC 3/7] block: Make use of qdict_set_default_bool(), Max Reitz, 2018/05/02
- [Qemu-block] [RFC 5/7] block: Add blk_new_open_string_opts(), Max Reitz, 2018/05/02
- [Qemu-block] [RFC 6/7] block: Use {blk_new, bdrv}_open_string_opts(), Max Reitz, 2018/05/02
- [Qemu-block] [RFC 7/7] iotests: Test internal option typing, Max Reitz, 2018/05/02
- Re: [Qemu-block] [RFC 0/7] block: Try to use correctly typed blockdev options, Max Reitz, 2018/05/02
- Re: [Qemu-block] [Qemu-devel] [RFC 0/7] block: Try to use correctly typed blockdev options, Markus Armbruster, 2018/05/03