Message ID | 20180625124238.25339-46-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | Use the IEC binary prefix definitions | expand |
On 06/25/2018 05:42 AM, Philippe Mathieu-Daudé wrote: > 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> > --- > linux-user/main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
Le 25/06/2018 à 14:42, Philippe Mathieu-Daudé a écrit : > 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> > --- > linux-user/main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/linux-user/main.c b/linux-user/main.c index 84e9ec9335..52b5a618fe 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; } }
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> --- linux-user/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)