[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH v5 46/46] bsd-user: Use the IEC binary prefix defi
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-trivial] [PATCH v5 46/46] bsd-user: Use the IEC binary prefix definitions |
Date: |
Mon, 25 Jun 2018 09:42:38 -0300 |
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>
---
bsd-user/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index da3b833975..0d3156974c 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qemu-version.h"
#include <machine/trap.h>
@@ -795,9 +796,9 @@ int main(int argc, char **argv)
if (x86_stack_size <= 0)
usage();
if (*r == 'M')
- x86_stack_size *= 1024 * 1024;
+ x86_stack_size *= MiB;
else if (*r == 'k' || *r == 'K')
- x86_stack_size *= 1024;
+ x86_stack_size *= KiB;
} else if (!strcmp(r, "L")) {
interp_prefix = argv[optind++];
} else if (!strcmp(r, "p")) {
--
2.18.0
- [Qemu-trivial] [PATCH v5 39/46] hw/rdma: Use the IEC binary prefix definitions, (continued)
- [Qemu-trivial] [PATCH v5 39/46] hw/rdma: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 40/46] cutils: Do not include "qemu/units.h" directly, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 41/46] hw/ppc: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 42/46] monitor: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 43/46] vl: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 44/46] tests/crypto: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- [Qemu-trivial] [PATCH v5 46/46] bsd-user: Use the IEC binary prefix definitions,
Philippe Mathieu-Daudé <=
- [Qemu-trivial] [PATCH v5 45/46] linux-user: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/25
- Re: [Qemu-trivial] [PATCH v5 00/46] Use the IEC binary prefix definitions, Michael S. Tsirkin, 2018/06/25
- Message not available
- Re: [Qemu-trivial] [Qemu-block] [PATCH v5 00/46] Use the IEC binary prefix definitions, Paolo Bonzini, 2018/06/29