From patchwork Fri Jul 8 15:46:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 588549 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp781031mab; Fri, 8 Jul 2022 08:51:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sMFDLMbgBJ6QLmSQctn/lPttyffzl+ph4VPRSrzgjHSr8DhBrF0pW3vnjpWflMyfv8VB49 X-Received: by 2002:ac8:7d96:0:b0:31e:a602:a1d5 with SMTP id c22-20020ac87d96000000b0031ea602a1d5mr2702655qtd.468.1657295480789; Fri, 08 Jul 2022 08:51:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657295480; cv=none; d=google.com; s=arc-20160816; b=DcZAxQjPQaYkCHXYjaW+erQxa3pXAjdfb5ff1ztjV5XXSPEjwICuJsCatWfBCc8NKq I4GNc2z36eoJrM2ivsZeu5+ZiPAJGcpRHDSiVzjtEnbVXvftSCD3lLB0jNZd/zCBjWzX RCwDxSnQo0+X2rCYVnktkYHWhfOzxRpmdTUieNqMb2nNBnTJZhJZEIUrN2aSaTTznPip 00emgZRW9Jkd0/d3Z9fD5aTIVFPBbZpFomzLWblIFgFE4b1+9X07gj2uQ7Hx72m6LeYF Qmat/kvLo2qOVcPMMC7IDC0OT3bupEAz8o6ZqBfmc9OW191Grwlcvq34+dwelg0qagmK kXjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=iiRXuoRm0+6hZcCT7CVhc/aX8fiaQgpUOM3IjX/kYqE=; b=icM1KUeYyLyNolK9d4sGaseeBHE5KwDwd5T1IEvjJpdsDmsJhg0XawA68qB51u1npk tmxelaej8XEuGZVZVVpiQ1riWnbs1cqx7HTo3ChZjeoeyJ0AAY+EhoJRC4RJwPCtA4v+ 5gGf9eAgs9ZQsSz7dX/34comn3ib0HCyyrh2izDoVVLYtbyxr7EkrmK1gnUZseYVd6AF Do/9WDHguZsp3OYAOQMxRV1fkNNrjXG32ZYPnPB8pvkI8SZHHA7f4N/H7emxWJkhEhQZ 1gZi0p0sQfIWFtI9iFi9/djpsyZWzlcMI7NDibzI5GAFw//JBxzGsyhmktBOlECak9np SJdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EXmm3to5; 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=pass (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 f36-20020a05622a1a2400b0031778f44a11si21909708qtb.220.2022.07.08.08.51.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2022 08:51:20 -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=pass header.i=@linaro.org header.s=google header.b=EXmm3to5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9qGG-0001Ni-DG for patch@linaro.org; Fri, 08 Jul 2022 11:51:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9qCG-0003v4-TS for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:47:13 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]:34613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9qCF-0002LY-Ce for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:47:12 -0400 Received: by mail-pf1-x430.google.com with SMTP id 70so8743622pfx.1 for ; Fri, 08 Jul 2022 08:47:11 -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=iiRXuoRm0+6hZcCT7CVhc/aX8fiaQgpUOM3IjX/kYqE=; b=EXmm3to53nsWS9DEDIkMCrgn8NrlmwgZC0zqNF0sq2jMvUgM86rlQVlpm+BOjLiMig zI73swUSdOvgPIT2s6enl1Vqs85aLOgSY58HzaHM0QivPslefXfMr1f38LYGIUHIVwtk JMO0rEA8IlkAymc8l1yRM/WanxNeIp2isRHADdMWKIv57E3iiDgGeuWdYwrcDo2qWM8h kMHCBnZBiXLG4ZWyfQ7Nfqf3zXK3OWt2uNRE2VQSG7gQjNWz4XJgyxCDF5ajolKLc1G4 F8iaXDUNsu2MvglKfZJKq6ciNbQyvLvbAQ7PWFmLrmdLakH4CdzjX9/6ix+/5hJo1IEk wm1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iiRXuoRm0+6hZcCT7CVhc/aX8fiaQgpUOM3IjX/kYqE=; b=vIurX2nZMKyB5zgt1DBTqiIz/Bd95zPoJmHn3RHTVOVufeJ6h2xJCvSvSTRcJYDwh5 EoSJuqVKXm54foAfLJDFTqt+jXCmUPD/iKAVWqdjRCVvGDn8QdyUi8fs/ADor97/ngI+ /oThj58UlUfZJiHOeXC3LVQflcGDyCJcRlbvUGAY1fO92Taf+hUHPbZ/j3RrumkYU3p7 mN1JT0hfuUIZpPCUM54S+m0tO7HClPcYgT+EmDzpWxwPrZDAMGqGbahqFSKBQpmWSadq UIK4kl03HABa2uzGzlvuahRiMtlbJhDSareiH0lEDQHmSHVjFkZM79kTK0E9sL0qKqZR /4XA== X-Gm-Message-State: AJIora/m0GIP0660MFCMBMJyTW6VklrJVLB+VonmQUNAtc3yvmeo2ylA s+1Sp0gXZ4CrbUqpbNIhiRfOwXNMBpYASMtm X-Received: by 2002:a63:481a:0:b0:411:7951:cbcd with SMTP id v26-20020a63481a000000b004117951cbcdmr3866584pga.66.1657295229649; Fri, 08 Jul 2022 08:47:09 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id y3-20020a17090a390300b001ef81bac701sm1782089pjb.42.2022.07.08.08.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 08:47:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Maydell Subject: [RISU PATCH v4 01/29] Use bool for tracing variables Date: Fri, 8 Jul 2022 21:16:32 +0530 Message-Id: <20220708154700.18682-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708154700.18682-1-richard.henderson@linaro.org> References: <20220708154700.18682-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- risu.h | 3 ++- reginfo.c | 2 +- risu.c | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/risu.h b/risu.h index 8d2d646..e2b4508 100644 --- a/risu.h +++ b/risu.h @@ -17,6 +17,7 @@ #include #include #include +#include /* Extra option processing for architectures */ extern const struct option * const arch_long_opts; @@ -96,7 +97,7 @@ int recv_and_compare_register_info(read_fn read_fn, * Should return 0 if it was a good match (ie end of test) * and 1 for a mismatch. */ -int report_match_status(int trace); +int report_match_status(bool trace); /* Interface provided by CPU-specific code: */ diff --git a/reginfo.c b/reginfo.c index dd42ae2..1b2a821 100644 --- a/reginfo.c +++ b/reginfo.c @@ -141,7 +141,7 @@ int recv_and_compare_register_info(read_fn read_fn, * Should return 0 if it was a good match (ie end of test) * and 1 for a mismatch. */ -int report_match_status(int trace) +int report_match_status(bool trace) { int resp = 0; fprintf(stderr, "match status...\n"); diff --git a/risu.c b/risu.c index 01525d2..79b1092 100644 --- a/risu.c +++ b/risu.c @@ -31,7 +31,7 @@ void *memblock; int apprentice_fd, master_fd; -int trace; +bool trace; size_t signal_count; #ifdef HAVE_ZLIB @@ -228,7 +228,7 @@ int master(void) signal_count); return 0; } else { - return report_match_status(0); + return report_match_status(false); } } set_sigill_handler(&master_sigill); @@ -250,7 +250,7 @@ int apprentice(void) #endif close(apprentice_fd); fprintf(stderr, "finished early after %zd checkpoints\n", signal_count); - return report_match_status(1); + return report_match_status(true); } set_sigill_handler(&apprentice_sigill); fprintf(stderr, "starting apprentice image at 0x%"PRIxPTR"\n", @@ -344,7 +344,7 @@ int main(int argc, char **argv) break; case 't': trace_fn = optarg; - trace = 1; + trace = true; break; case 'h': hostname = optarg;