From patchwork Sat Jun 30 06:10:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 937335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NuYb343p"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41HkVP52Pmz9ry1 for ; Sat, 30 Jun 2018 16:43:08 +1000 (AEST) Received: from localhost ([::1]:45831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ9b6-0006UK-8w for incoming@patchwork.ozlabs.org; Sat, 30 Jun 2018 02:43:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZ96a-0004hG-PD for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZ96X-00039B-LC for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:32 -0400 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:32909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZ96X-00037D-Df for qemu-devel@nongnu.org; Sat, 30 Jun 2018 02:11:29 -0400 Received: by mail-wr0-x22d.google.com with SMTP id k7-v6so7156195wrq.0 for ; Fri, 29 Jun 2018 23:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CtMU1Ey5z5RUkG4m9AD46PfjfnmkBdWrV4mqsLUA7oM=; b=NuYb343pn53lCzsK4GxxwgHBKVq46Gpya4xhDs1pCAz1zdtqvZhL6u4LqD5L5thhOB hEhNHkGgwRHy/4Yb0QxJxkgByjcQeTkYic9bWICKTM2sru45rrW3Ca+cQc4Gsl3exFHi ejCPW9lJrI2UZ27KcXhHJrpYofpJeeOBxsjtSeXmMqJGsGE6E/F4Eogw3uxEIp3vGOco qRYjLVqz6XpNoj6UiyeT9zSvWQrJt//BmnBi9QfQUJ4SOdGbUN70BpLfK1uzfaVtZXGM IT0WirTGjH2H5rLACUEEtj+pFoonJFeMgkDks+hgFsuBV9tz8qFtBk69fk/54dCzTWCk 7C1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CtMU1Ey5z5RUkG4m9AD46PfjfnmkBdWrV4mqsLUA7oM=; b=JuG8y6MDWLYPE1zOcQZouZDVBbyTQFabeCwcgmJgm1yychi0ccYp7CrtsMbNOx8dSb tL1OWnbXUqNx6K+A9jOPD6Fbz7nTwR1dlVd3ac4XsowYEOjEukz6jwdW5ujii7goshqV U0akGeyZhpKW/71+6FnV/e2r0fqxuLzE72GDknMErGtPYKFoKei4Q2hS/GpL4GJF+Qxq 27LFC0PoqaE2vBxM5KJdwsgbHO2q6rd7MsppPqKnMzMoezKaOJ9AB28Y82s8SthLr2QA pXCrw8X3FhW9UDRORqpNNP4tfTUfIDWG0gSQ7fbI++sh78+dX06MIUSlYewOCNhDhs/d /enQ== X-Gm-Message-State: APt69E3gKrvBniJa0PWlbRegeXlWi5AqqdxINYwZbjgPsud50ezZfbGd 74fTUrnWl+8TElUf7UaFBCfI/SXO X-Google-Smtp-Source: AAOMgpfrjJQDGTNQrRwC3kFbpyiO5TRnJTbVg0+GJAHkfW/diCNXNTQ0cbj+W0Tx0ZqbFNqbGCQbcg== X-Received: by 2002:adf:e841:: with SMTP id d1-v6mr550408wrn.269.1530339088204; Fri, 29 Jun 2018 23:11:28 -0700 (PDT) Received: from donizetti.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 24-v6sm563454wrz.94.2018.06.29.23.11.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 23:11:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sat, 30 Jun 2018 08:10:38 +0200 Message-Id: <20180630061040.6018-46-pbonzini@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180630061040.6018-1-pbonzini@redhat.com> References: <20180630061040.6018-1-pbonzini@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22d Subject: [Qemu-devel] [PULL 45/47] linux-user: Use the IEC binary prefix definitions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé It eases code review, unit is explicit. Patch generated using: $ git grep -n '[<>][<>]= ?[1-5]0' and modified manually. Suggested-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180625124238.25339-46-f4bug@amsat.org> Signed-off-by: Paolo Bonzini --- linux-user/main.c | 5 +++-- 1 file 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 . */ #include "qemu/osdep.h" +#include "qemu/units.h" #include "qemu-version.h" #include #include @@ -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; } }