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 <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180625124238.25339-43-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2018-06-25 09:42:34 -03:00 committed by Paolo Bonzini
parent af5ecb4739
commit 8ec338acfc
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@
*/ */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu/units.h"
#include <dirent.h> #include <dirent.h>
#include "cpu.h" #include "cpu.h"
#include "hw/hw.h" #include "hw/hw.h"
@ -3303,7 +3304,7 @@ static QDict *monitor_parse_arguments(Monitor *mon,
monitor_printf(mon, "enter a positive value\n"); monitor_printf(mon, "enter a positive value\n");
goto fail; goto fail;
} }
val <<= 20; val *= MiB;
} }
qdict_put_int(qdict, key, val); qdict_put_int(qdict, key, val);
} }