qemu-block
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]