diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-06-25 09:42:37 -0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-07-02 15:41:18 +0200 |
commit | b52713c1d5fb3f05b07bdcaa52d0a665d26eaff6 (patch) | |
tree | 8b6e179992a82ab6e2e24a9fda3f2a579345aaf2 | |
parent | 68dbb6d05db59fe39af0c192005490576d9f5b7c (diff) | |
download | qemu-b52713c1d5fb3f05b07bdcaa52d0a665d26eaff6.zip qemu-b52713c1d5fb3f05b07bdcaa52d0a665d26eaff6.tar.gz qemu-b52713c1d5fb3f05b07bdcaa52d0a665d26eaff6.tar.bz2 |
linux-user: 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-46-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | linux-user/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 84e9ec9..52b5a61 100644 --- a/linux-user/main.c +++ b/linux-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 <sys/syscall.h> #include <sys/resource.h> @@ -274,9 +275,9 @@ static void handle_arg_stack_size(const char *arg) } if (*p == 'M') { - guest_stack_size *= 1024 * 1024; + guest_stack_size *= MiB; } else if (*p == 'k' || *p == 'K') { - guest_stack_size *= 1024; + guest_stack_size *= KiB; } } |