From patchwork Sun Mar 20 17:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 553210 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp892769mag; Sun, 20 Mar 2022 10:54:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBT0vJkw++jfE5SaL0+TgGAF88VgXPV38pZa39j082srikvvpQYM/wP6ijn03pgVgndmp3 X-Received: by 2002:a0c:8e0b:0:b0:435:1779:7b22 with SMTP id v11-20020a0c8e0b000000b0043517797b22mr13480605qvb.63.1647798874353; Sun, 20 Mar 2022 10:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647798874; cv=none; d=google.com; s=arc-20160816; b=ayB9Z4PIC9XbXp5cA8q6kGQzdJPcdupy0Dn3z91AZ9hYFqrTNe9QYYbeNgQ2rqYsID LbAbefj54iMOAn/RrJvTlCgaAYhmjIB29pOlsNskHLz/bfWOrScEj+MvlF17fudkg4OB 4cMCe7sa9EZSKnZr8atphSQlpGhkU/+SQ9pEY7Q//GZZt3D942OqjxZYGurE6pEaPvRt pTSEFNAX+x4Iax7JSd0vE6dqUAqKbriQnqUsGYMs4PGkbtl3qqXH3wPIGC/7q9Hjf5gX rigVbKSgPC34AjVBd7N8JGXMG3VMs7lXf6KZvf4xkeOa+GJX7hSgHoqB4nVNSBybfA+q FXGw== 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=X5VZGVfDRwsa6U5imM3TbqL1rDwZxZr3FYEMX2oqv64=; b=mRgpmN9l8jD9RobrEAS7jsPa9K+1fKQS8O3KLZUlr5oSdh0eGhf9ptOKxOzYeESB3v QJZDbfn23MANMdJCDc3hyqyo5cdKiofcAbhvAJXgHzxMp+YIMnYh2JFLN3MsTGVRO1Vq mNlj8+4vsmI0MIUkWbA6jWk1RNDC60bC11M2IHm63SFLuxJ8/hpps7bnGL5+qWLXkhDQ cquliT3swHQf5BVS4Pviq/wSaOCnqYcMZwGRRFGkUbckzgiSOKBaJlB7JxQOAl5PJ6S+ fywuZCQS9fSe1Z+u5Pv+Zrbx4vF+MSBvGGXVwrauZKxdcIDIdr4YVMqEyGtUV7qHRf9c GjKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gkvCUH+2; 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 u1-20020a05620a0c4100b0067e4be23882si1593912qki.199.2022.03.20.10.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 20 Mar 2022 10:54:34 -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=gkvCUH+2; 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]:46406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVzlB-0002Ia-US for patch@linaro.org; Sun, 20 Mar 2022 13:54:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVz64-0000H9-8d for qemu-devel@nongnu.org; Sun, 20 Mar 2022 13:12:04 -0400 Received: from [2607:f8b0:4864:20::1031] (port=45830 helo=mail-pj1-x1031.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVz62-0003V1-Rj for qemu-devel@nongnu.org; Sun, 20 Mar 2022 13:12:03 -0400 Received: by mail-pj1-x1031.google.com with SMTP id m11-20020a17090a7f8b00b001beef6143a8so12525038pjl.4 for ; Sun, 20 Mar 2022 10:12:02 -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=X5VZGVfDRwsa6U5imM3TbqL1rDwZxZr3FYEMX2oqv64=; b=gkvCUH+25Jp/H+u8K+OTbkHDz4ZpZx+i3HazrP92UjrcXmjhlzNvC8NA92KZia3mfa 2ZT42MycZHIDl8s7chTaKesh5WTKZ2UYHcwDGhK3/xyH39xgryJugYP17fF/kO7RASqe sS2e3MBgHx1i+W1Y5E7JLhrq6oVpGEciaiAvWhXl57TDNTGaL0sBkX2rhhBUDgJCvqG7 C/3v6hS0ki+j97+6C+Ka5do5lKbH9Zl68rKBtSmRyz3vV7mpoVMQMA7L2GS3jPpiIf/s 9QmXKmQdF6xwXZoGvDFlYqUiYI4Qo+n/Sl2k7mwHfhPEJQLXOK0GKHlFcO/liBb6jXUK lD7Q== 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=X5VZGVfDRwsa6U5imM3TbqL1rDwZxZr3FYEMX2oqv64=; b=Yr7aqi8fkV99XKzz6qad/txGbs04KC5XD75ny34Vpv31qIxGI9TVTKjEmsLwQ0YA4L +PXUpaVYH628oUZxUcTLCVG/iWmWkmaDB+9N52xjGxaRIhiTp8UaRV3TPkCrUgsNonHe B5y2dZtgiFLmip6YZm26pgXePNCBhrRXq7aSxOrB5Tx+NtHym7cPP4ElTVBV5m7QhxqK uTTNqUFcOxMxo23jO710GJ5+QQ2S+bI4Kpak0XQVZ6/juRWUtIzgcGAsVHl1QDrR5ANp 8H1F39TGai5HFlGp3onFt/INitEFJ8ZhFLRLkQEv4RxP0kNMh86nOk/r/MKsOSAmVbxA GYNg== X-Gm-Message-State: AOAM533NemXVAxki1G7s2KpgxYsspyhU3VcRekU4cfoqyUVMI/9h7LPT vt56lVjG5zNbbL5BvrYUxPmJ6X4k9M6fSA== X-Received: by 2002:a17:90a:4097:b0:1c6:ca92:7a83 with SMTP id l23-20020a17090a409700b001c6ca927a83mr11177526pjg.130.1647796321538; Sun, 20 Mar 2022 10:12:01 -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.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Mar 2022 10:12:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-7.1 27/36] softmmu: Use qemu_set_log_filename_flags Date: Sun, 20 Mar 2022 10:11:26 -0700 Message-Id: <20220320171135.2704502-28-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::1031 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.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 at startup in one step. Signed-off-by: Richard Henderson --- softmmu/vl.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 73296015af..81c91ec7b0 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2559,19 +2559,16 @@ static void qemu_process_early_options(void) #endif /* Open the logfile at this point and set the log mask if necessary. */ - if (log_file) { - 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); - } else { - qemu_set_log(0, &error_fatal); + qemu_set_log_filename_flags(log_file, mask, &error_fatal); } qemu_add_default_firmwarepath();