diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2018-06-25 09:42:38 -0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-07-02 15:41:18 +0200 |
commit | 66d26ddb235439c72ff2b5fc0b42e242a57ba315 (patch) | |
tree | b3f2a38eac1265db10c714791542ba2e3bfcd2b3 /bsd-user/main.c | |
parent | b52713c1d5fb3f05b07bdcaa52d0a665d26eaff6 (diff) | |
download | qemu-66d26ddb235439c72ff2b5fc0b42e242a57ba315.zip qemu-66d26ddb235439c72ff2b5fc0b42e242a57ba315.tar.gz qemu-66d26ddb235439c72ff2b5fc0b42e242a57ba315.tar.bz2 |
bsd-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-47-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'bsd-user/main.c')
-rw-r--r-- | bsd-user/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c index da3b833..0d31569 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")) { |