From patchwork Thu Apr 9 21:15:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 185324 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp2320951ilr; Thu, 9 Apr 2020 14:17:58 -0700 (PDT) X-Google-Smtp-Source: APiQypLtJyea0AcvbrsiWfIW8BXDRjYbTC/SMGYvd0XMLpo9upLF98ComEdR4CJ/Q1iq5rBb6CnE X-Received: by 2002:ac8:3805:: with SMTP id q5mr1478044qtb.46.1586467078762; Thu, 09 Apr 2020 14:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586467078; cv=none; d=google.com; s=arc-20160816; b=qN62etzcNhBL+97Wq76NJLGgikSmBM/mdpRFgOrhx6JYqQoAK5Y4Qrivz/cW/63qcd fyw2YlDHS7gjiJFALnarcq2M85YWb/9RPdpHY9dRIXt70BreTLZOlW8SDG6STi5hjRWa GA9GdwWz99aLTtAyqZz9m2r5KF5krh4jcEUqE6r2xqBrgii7pkubTUHONsq4Pg0yqn6M fmJmTDNA3cqAVOhtYhDSvZK6ei00k9dPRhNsptlePWDct7HG3ky1BeWOUrL3yLerkady urE2oTD3/pRYlqY6STijtge64Yh+P18v5vpGceeQE+usVUIAKTSKrldvfHLrc5oLDcHl Ctxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=L3oo5e13KKY97yaceKpUyQX6w7q5mwKsED5f0rgFBwI=; b=Imrq/z74I20PnYpZoMvyX+XRjhl5H3wgAu8rAMbJNSscL0pGQT1rADbkKepy+soEzr tVEyZX8jvgSDbVbWmIfYdyBuCKASWXQsNu6TrU06A7hJxU19ldSkjtWs9WV38u/unvRL H38bC0/6pdkyEAQ4mxP7J2sTfo0fpNIkpAGMtsVzAvyEgNcSwUSfge7xh1Cju/hJ7niV KNNHgqjaupP6fFA5FhAObEOoBJEerUvz0WmNC4khwMbzaVlY7/nCulSFPJNxNHiO8Xkm NaDdTrbfENPG328vYnXJqM9zflWJDuhSZLNkKogHszMds6DnJyOgflneSYFJwHG/6ud6 PgFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EZ9x65bB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i1si1429952qtp.217.2020.04.09.14.17.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Apr 2020 14:17:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EZ9x65bB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMeYg-0005aL-7i for patch@linaro.org; Thu, 09 Apr 2020 17:17:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMeWN-00020d-FZ for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMeWM-0005cE-B8 for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:35 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:46568) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMeWM-0005bp-5V for qemu-devel@nongnu.org; Thu, 09 Apr 2020 17:15:34 -0400 Received: by mail-wr1-x444.google.com with SMTP id f13so7119339wrm.13 for ; Thu, 09 Apr 2020 14:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L3oo5e13KKY97yaceKpUyQX6w7q5mwKsED5f0rgFBwI=; b=EZ9x65bBr9LDMxcvIuXSUbh89pfWZKhTgBH478avcUIAU1K6WbB8Dn0AWPoHlx2Nxo aQP+qZrjNSOYdgdGuN8422Uvpnc8ApzX9nPonIU7S+JpRWFHxgXMSBblHNmE79hpW1CY FVzbQ+LuFzgo1LlLoKW+EAWa4++8sguttc98lfFSQbjt796IuX6soG9WkhtWiswu53IV qawawKKfX+g3Q0aKtT8ievfa+v3KYFYb/LC9jWvt+ANsKIG6ckYX59aQM/b3DesJVXcL sAqPNFEpCqZO9mSKz74vXPlwmcWTxulJk9i5IaBjKRIDcaI+dUNG96oBdLFfAYFXSlnr L0Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L3oo5e13KKY97yaceKpUyQX6w7q5mwKsED5f0rgFBwI=; b=Slh69rrLFQXZEbfAXfvNnT5MJi3HZMficzW+m3U15w6Md11vbvLMZIhw2lUxnweHsz fqcysS1gC/SLz/OeZwovVe7a18yIdvSK1HO0koI5hiLRG66oLMzVgyiyEEpL1p8c60H5 laPEU/7ym7+lkfwZZB22Sj3FmwI9QzXVUEec+iathd39ml9DOidyEQ/7wGIyu2k+Q4Xk Nj7j9vykdjvvHx8Q8ZhGQrkwgeyJNzYrYmwROLLHiP082e+CB7ehff+ML9mIwl0gjMZi VtVhvetrXot6Rz7hs6sT4ic45+fOpzsQj0OEPcHHcLFy8+F+xJyKP/ZnNe4tFEEkrnwH tEkQ== X-Gm-Message-State: AGi0PuZ6w7qSpKUQp3FNyjQ2gH0zBUhSfT1vhFvk6tFPArXLNAhdqIfg HIkyAjSpjmu4jPY3PuJrNpz2og== X-Received: by 2002:adf:afe4:: with SMTP id y36mr1103433wrd.205.1586466932969; Thu, 09 Apr 2020 14:15:32 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i8sm44602522wrb.41.2020.04.09.14.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 14:15:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 391D11FF8C; Thu, 9 Apr 2020 22:15:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/11] exec/cpu-all: Use bool for have_guest_base Date: Thu, 9 Apr 2020 22:15:20 +0100 Message-Id: <20200409211529.5269-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200409211529.5269-1-alex.bennee@linaro.org> References: <20200409211529.5269-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Richard Henderson , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée --- include/exec/cpu-all.h | 2 +- bsd-user/main.c | 4 ++-- linux-user/main.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 49384bb66a5..b4fb5832c4a 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -159,7 +159,7 @@ static inline void tswap64s(uint64_t *s) * This allows the guest address space to be offset to a convenient location. */ extern unsigned long guest_base; -extern int have_guest_base; +extern bool have_guest_base; extern unsigned long reserved_va; #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS diff --git a/bsd-user/main.c b/bsd-user/main.c index 770c2b267ad..aef5531628a 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -42,7 +42,7 @@ int singlestep; unsigned long mmap_min_addr; unsigned long guest_base; -int have_guest_base; +bool have_guest_base; unsigned long reserved_va; static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; @@ -828,7 +828,7 @@ int main(int argc, char **argv) } } else if (!strcmp(r, "B")) { guest_base = strtol(argv[optind++], NULL, 0); - have_guest_base = 1; + have_guest_base = true; } else if (!strcmp(r, "drop-ld-preload")) { (void) envlist_unsetenv(envlist, "LD_PRELOAD"); } else if (!strcmp(r, "bsd")) { diff --git a/linux-user/main.c b/linux-user/main.c index 1d20a83d4e8..90ad365b439 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -59,7 +59,7 @@ static const char *cpu_type; static const char *seed_optarg; unsigned long mmap_min_addr; unsigned long guest_base; -int have_guest_base; +bool have_guest_base; /* * Used to implement backwards-compatibility for the `-strace`, and @@ -334,7 +334,7 @@ static void handle_arg_cpu(const char *arg) static void handle_arg_guest_base(const char *arg) { guest_base = strtol(arg, NULL, 0); - have_guest_base = 1; + have_guest_base = true; } static void handle_arg_reserved_va(const char *arg)