From 8ec338acfc86cf0360585fb899aca42661616011 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 25 Jun 2018 09:42:34 -0300 Subject: monitor: Use the IEC binary prefix definitions It eases code review, unit is explicit. Patch generated using: $ git grep -n '[<>][<>]= ?[1-5]0' and modified manually. Suggested-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180625124238.25339-43-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 567668a0e7..3a0ea0c602 100644 --- a/monitor.c +++ b/monitor.c @@ -23,6 +23,7 @@ */ #include "qemu/osdep.h" +#include "qemu/units.h" #include #include "cpu.h" #include "hw/hw.h" @@ -3303,7 +3304,7 @@ static QDict *monitor_parse_arguments(Monitor *mon, monitor_printf(mon, "enter a positive value\n"); goto fail; } - val <<= 20; + val *= MiB; } qdict_put_int(qdict, key, val); } -- cgit v1.2.3-55-g7522