From: Philippe Mathieu-Daudé Date: Mon, 25 Jun 2018 12:42:34 +0000 (-0300) Subject: monitor: Use the IEC binary prefix definitions X-Git-Tag: v3.0.0-rc0~34^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ec338acfc86cf0360585fb899aca42661616011;p=thirdparty%2Fqemu.git 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 --- diff --git a/monitor.c b/monitor.c index 567668a0e71..3a0ea0c6026 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); }