diff mbox series

[PULL,42/47] monitor: Use the IEC binary prefix definitions

Message ID 20180630061040.6018-43-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/47] i386/kvm: add support for Hyper-V TLB flush | expand

Commit Message

Paolo Bonzini June 30, 2018, 6:10 a.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

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>
---
 monitor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/monitor.c b/monitor.c
index 0988eb4..61b727a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -23,6 +23,7 @@ 
  */
 
 #include "qemu/osdep.h"
+#include "qemu/units.h"
 #include <dirent.h>
 #include "cpu.h"
 #include "hw/hw.h"
@@ -3288,7 +3289,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);
             }