Skip to content

Commit

Permalink
linux-user: Use the IEC binary prefix definitions
Browse files Browse the repository at this point in the history
It eases code review, unit is explicit.

Patch generated using:

  $ git grep -n '[<>][<>]= ?[1-5]0'

and modified manually.

Suggested-by: Eric Blake <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
philmd authored and bonzini committed Jul 2, 2018
1 parent 68dbb6d commit b52713c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions linux-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit b52713c

Please sign in to comment.