]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user: Use the IEC binary prefix definitions
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 25 Jun 2018 12:42:37 +0000 (09:42 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Jul 2018 13:41:18 +0000 (15:41 +0200)
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>
linux-user/main.c

index 84e9ec93356984bdd97eabf5e68f3b51a07823a1..52b5a618fe8e3f5636e6c3a29d81939364b803a1 100644 (file)
@@ -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;
     }
 }