[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 42/47] monitor: Use the IEC binary prefix definitions
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 42/47] monitor: Use the IEC binary prefix definitions |
Date: |
Sat, 30 Jun 2018 08:10:35 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
It eases code review, unit is explicit.
Patch generated using:
$ git grep -n '[<>][<>]= ?[1-5]0'
and modified manually.
Suggested-by: Eric Blake <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
--
1.8.3.1
- [Qemu-devel] [PULL 32/47] hw/mips: Use the IEC binary prefix definitions, (continued)
- [Qemu-devel] [PULL 32/47] hw/mips: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 35/47] hw/net: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 36/47] hw/usb: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 37/47] hw/sd: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 40/47] hw/rdma: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 38/47] hw/vfio: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 33/47] hw/ppc: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 39/47] hw/virtio: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 41/47] cutils: Do not include "qemu/units.h" directly, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 43/47] vl: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 42/47] monitor: Use the IEC binary prefix definitions,
Paolo Bonzini <=
- [Qemu-devel] [PULL 47/47] serial: Open non-block, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 46/47] bsd-user: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 44/47] tests/crypto: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- [Qemu-devel] [PULL 45/47] linux-user: Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/30
- Re: [Qemu-devel] [PULL 00/47] More misc patches for 3.0 soft freeze, Peter Maydell, 2018/06/30