From patchwork Sun Mar 20 17:11:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 553200 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp885141mag; Sun, 20 Mar 2022 10:36:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ4RWqwoiBooBgOMW4sINWstfqfBEFa4HvVte97AOrBskO+aCUD4YL7rx9hN36akNVz7MS X-Received: by 2002:a05:620a:2293:b0:600:2b7b:2a19 with SMTP id o19-20020a05620a229300b006002b7b2a19mr10564864qkh.408.1647797763026; Sun, 20 Mar 2022 10:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647797763; cv=none; d=google.com; s=arc-20160816; b=Xp/Ibh3tMus77DVBhwJoN/8mYMweYnk9ERVJusTqTyUnXK3rRtf0eWnx0oDmei0ge5 NJnq7RAnSgfe4UdzKc5OCCqNHkqaPq/6NKigf3HufL8BV5YFcxy/sAV/XXXGEI15RiyW U++JUxXpLBBvvYlZmPgH/ia4tV/DHAxB6dnbhFiIoxi+ZmcYig0RTBXXynbD2JeCG1QX iCzIJM43VYxfhxmI8nmPmmtB4IZ6Is/xS01pvPPnAMcKnevZs/54EYmHgd0KKrXG6mJL PHCQvs6MehjAA1wtBixCfxsL3aZjn3wBxBw6xvTzITbORl1gfNvF1KIpi0F8evVD2biT d6qg== 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=yC2sireZoOTYAuTYG5JxotkaWGRw4AVLDFu3n1FRWSw=; b=PRtmjSpQHilYRJJ9Xq2AA4Y9iIEZMublD1dEkqqSHv0piZpzTnVxPfi/VcK+fiYfTr 2QGNODUtcnAf0tsn6eW75QPtVdzHGtR16YyCs5wKSiPMWOmVX49ZhLUB3VcGbHIxhquR zFGrtuou/NPMnV1bXvYFLrmNpleSdQm+TC5mo0FyObQxikjYieamAD9yFW/FuGF3g8i1 0HGWCwq8OmMXcEXPe5LaE3QpiYvB3iapO07aZL2AdiCxh30Qm7SWEdV/Xx2sYJTRgZIZ 72NQ8kZqrwKDnfrwnuZcTMks+RcduNgyeCKk3VjixwWG594cTi/IcFlKuD2aCx45x8Av ZNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ga9KnqhL; 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 x2-20020a05620a448200b0067e4be2388esi1486857qkp.211.2022.03.20.10.36.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Mar 2022 10:36:03 -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=ga9KnqhL; 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]:47898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVzTG-0000ch-Jp for patch@linaro.org; Sun, 20 Mar 2022 13:36:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVz62-0000AA-EB for qemu-devel@nongnu.org; Sun, 20 Mar 2022 13:12:02 -0400 Received: from [2607:f8b0:4864:20::102a] (port=33964 helo=mail-pj1-x102a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVz60-0003Ud-Uq for qemu-devel@nongnu.org; Sun, 20 Mar 2022 13:12:02 -0400 Received: by mail-pj1-x102a.google.com with SMTP id o68-20020a17090a0a4a00b001c686a48263so6075330pjo.1 for ; Sun, 20 Mar 2022 10:12:00 -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=yC2sireZoOTYAuTYG5JxotkaWGRw4AVLDFu3n1FRWSw=; b=ga9KnqhL47LNO+pd9SEOECHzxpZHT8tgpKN9YEz06NgCaPr/6lCyH2omP9lCJeP+Bs ZzytrAcBTmIrHoZ0jvtncuzUocbLH0zX/YRB+5q344VpsHaSKgzWOvdLnock7HVlSFTr wqAGso3R/xHJwecSNHbqHV0SfQLFuinDvbpOlfDYGIFOC0iQGV1dQ4H4d59Z9NmDdQjh e8vh/y2yoOwF3FZH6qKwkoz90wy6gv3WK1h1UNed8kIfUyB89E4YGOC8wAkjo+1XOfbO 7uKhcPXik+IShYngulX4snz13DXi3TaoLcjz1LdqFJIPXZNRVSWSGyAFpLGP9IWiF7GU QgrQ== 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=yC2sireZoOTYAuTYG5JxotkaWGRw4AVLDFu3n1FRWSw=; b=6DG5bP4RctCIMKbs0bRDaz1iArRq/Av73uYSO2OPSwevUq/rZ3ymmGcDQG/Cf/4vHg z900WAzoVq6SP5EJJ1/Fqqr/4l7ZNSvJMhECtSaGp8zwM0gv7rKuQktP5eJ8xC/SrvLX IlX9L/KqY6Y1DknWKgwOihRlcAiXsKz9dalPWtXCk+py+baHnwUfkRUmFEgZXneyMtDD n9Brz/1dKLpDuMBhk1hh7OmHZodhMLtsHQJfjazKkH5srd8QgIbV8QW2vcTOTHWlSkBw Gl0aD8k73IaDhCF7bp52vxrGrjFRMnK+tw5R/bzEX5pMTa0EPCQMw+oHp11WrgTEejnJ nqqw== X-Gm-Message-State: AOAM533zZgWLamzFmxT6CJQH5lm1db6sE2uk4BQyERm5/5YMQilF3XFL P/aFbRwnQiSDgNp89KMdhoZlB3Vc/ujtPQ== X-Received: by 2002:a17:90b:38c9:b0:1c7:1ffb:533b with SMTP id nn9-20020a17090b38c900b001c71ffb533bmr640207pjb.220.1647796319663; Sun, 20 Mar 2022 10:11:59 -0700 (PDT) Received: from localhost.localdomain (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id q12-20020a17090aa00c00b001bc6f1baaaesm17149697pjp.39.2022.03.20.10.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 10:11:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-7.1 25/36] bsd-user: Use qemu_set_log_filename_flags Date: Sun, 20 Mar 2022 10:11:24 -0700 Message-Id: <20220320171135.2704502-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220320171135.2704502-1-richard.henderson@linaro.org> References: <20220320171135.2704502-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102a (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Perform all logfile setup in one step. Signed-off-by: Richard Henderson --- bsd-user/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index d25d1c6015..2c8f8d1c19 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -405,16 +405,16 @@ int main(int argc, char **argv) } /* init debug */ - qemu_set_log_filename(log_file, &error_fatal); - if (log_mask) { - int mask; - - mask = qemu_str_to_log_mask(log_mask); - if (!mask) { - qemu_print_log_usage(stdout); - exit(1); + { + int mask = 0; + if (log_mask) { + mask = qemu_str_to_log_mask(log_mask); + if (!mask) { + qemu_print_log_usage(stdout); + exit(1); + } } - qemu_set_log(mask, &error_fatal); + qemu_set_log_filename_flags(log_file, mask, &error_fatal); } if (optind >= argc) {