From patchwork Wed Apr 20 18:06:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 563983 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4407684map; Wed, 20 Apr 2022 11:19:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4qWzYHEF8eccv+BGoiDFTG1+TUg+sz0ksmRq6ZOZui8HV9PANhLNd8UlkfSGX/Y4FEknO X-Received: by 2002:a81:a82:0:b0:2eb:ebe3:3924 with SMTP id 124-20020a810a82000000b002ebebe33924mr23077316ywk.360.1650478793911; Wed, 20 Apr 2022 11:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650478793; cv=none; d=google.com; s=arc-20160816; b=K526qSdZKI0aDUOj+qD+qxMnPeN1BrJ1ZuaOtmqqt3E5iDf1CxDoVBRMHDIBPvBx6G 2jGwNGHbFcaSEeBw5ygd0GvCp63nSGBuRlESokz5+z5avncUets5o/pP1adNDeE7MF+9 /Aandpmo5CLbH4D45/6GQXr7axE6X/0AuvO4RYVY4TzjDOSX037qVtLULJsJ0RdJdJty QSl0b4ZNQc0LgbU+tsbnZ5FOnFhjqEXOEqx/6qj0YQ8Cy7ETNl+u6Sj2nCH71SwND7O2 WZOMXEJgqh+AQqzrm1h/Hpp/5HPsAmkO5cjRAsfG9u9hQAGZBO//Z7BfTLbSAt+yusUv Bb6Q== 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=7eEUo/lkzPtBSQrQRpI3Km3z9H0IRO1hS7ph/cOmoCs=; b=i3oWmTELIgor91rVgenSKhWiqLNhCLX/ibEsoHu4JmyeVc0Hs2IzcVJMq4vuLBD5zg QxAcl26zi/mTAAUx0DjjwZMHl/GSQqGu91P7FMFtYY1hFJDnr4k0A9p20gXFErA9/nNg pU2nbBWjXEMZyVsj6b0FSpFoMY/y02JN7mkM/GSglL44VMIW43V33L09qu4x8rKECF2S QjNrfh7NSNchgrGYzYiKmw636WoWgfg+4aMIWjJSBtDIaJ06E+6+sbyU0TYAWhJAqb5M P0lJqcuZiKQNTb2HFMQhqaNmECtu4dYExT6nGFGEZouPFwL4NpEOS6Sfo6Aa7gWxtx9D TwBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vycUFljy; 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 w8-20020a25b888000000b00644f191d805si582581ybj.509.2022.04.20.11.19.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:19:53 -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=vycUFljy; 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]:34962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhEvh-0000SS-F0 for patch@linaro.org; Wed, 20 Apr 2022 14:19:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEj5-0006BG-Je for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:51 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:35563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEj4-0001MD-0E for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:51 -0400 Received: by mail-pg1-x52d.google.com with SMTP id r83so2341744pgr.2 for ; Wed, 20 Apr 2022 11:06:49 -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=7eEUo/lkzPtBSQrQRpI3Km3z9H0IRO1hS7ph/cOmoCs=; b=vycUFljyLFxkvYBOt1P+W6jDxDjm7ltxqewprzMoR0SlPsgGfYOt44dfrvcngxS5DT f0uKTdvDWy1DnnaNK8SDujKazln3gCzRhq1TOMQZ98WVkBWJmG6ifRz4yQo/iNATnYrE rQ+oZK2MbWAa1OSYIi3Svu8bw91AXgMJHAJgjZajQUD4Ii/TdSYPWyrOWF26sxoJO0ch HkYkG4GqfGs6wjuLoUoy8uOMDN8xzPW7H0EH63hNAHHYHG9fNFVbRFTKo+Fcnu6BJ2M5 l2sobtOEB1HuhwIZzdNQgHY3HH/ZZFpM6ctZoloRT/fzp31hZJ33ZtjXjmJbXKB0VF1H 12sQ== 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=7eEUo/lkzPtBSQrQRpI3Km3z9H0IRO1hS7ph/cOmoCs=; b=it7OQyG6OX6Qm/Hkx1k1LQra4A4pAFA9jjS3tNBIvvr6ecw1nOCK36oE0QiIRtic41 5nNessWKEh98EAjtAC9SqctUpJ+lqrYZgjJ/rex8OPqfZtxHd5oYGfnjmf27DQTJVND+ cbwYm6/UZopUgMiFouCbUM23/4AYtGW7HEP8gQOJ7M1C9BoD6FQDc4ARg6faJSzcNvNy 5vvok4kCNYnOLcxhIscsMNLbxkhmLsCY95ixzwZQnakWh13CoLG6pIjx5P+MV3TV0gZt HE/AzwgVQWtM22WbrsUzYYU51LwGMzWV26saHfs3ApsZHRuSrM/SWkBY3bmxyXobHxYj OVWg== X-Gm-Message-State: AOAM5308MvdJZ71JHOHh1bpOc+S3KcrQbc0rg1mIQaMkd/ygxj0yrJiP JsTjiF9b7DjMZvDfWYN8nmcF/sX0FeFBbg== X-Received: by 2002:a63:d64d:0:b0:374:6edc:989c with SMTP id d13-20020a63d64d000000b003746edc989cmr20454636pgj.434.1650478008781; Wed, 20 Apr 2022 11:06:48 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id i2-20020a17090a058200b001d2fc489b8asm56681pji.25.2022.04.20.11.06.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:06:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 28/39] bsd-user: Use qemu_set_log_filename_flags Date: Wed, 20 Apr 2022 11:06:07 -0700 Message-Id: <20220420180618.1183855-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220420180618.1183855-1-richard.henderson@linaro.org> References: <20220420180618.1183855-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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=ham 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: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Perform all logfile setup in one step. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-29-richard.henderson@linaro.org> --- 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 ed26fc5acb..aa13eae7f3 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) {