From patchwork Sat Mar 26 13:24:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 554353 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp6427562mag; Sat, 26 Mar 2022 06:35:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzngXi4k6LweG23driWekzPXPUMA5Xr6oquh1m46Rd+fO2zzjqFR0T/Iocy6nhPS7ktpjPk X-Received: by 2002:a05:6214:f62:b0:441:2cd7:9cfa with SMTP id iy2-20020a0562140f6200b004412cd79cfamr13174484qvb.61.1648301703556; Sat, 26 Mar 2022 06:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648301703; cv=none; d=google.com; s=arc-20160816; b=XMxcjXwZgHzDMnS4Zq4ZxYIuegxWWcPpxsBFLBegEMpt14RwdtCpkHB6AK8hw6peFB r8CYFLfS5GMMPlDI7X/QMK3V89OPWnkyDZLe5V3IRcue83bCd4CXDR8S2FJkIr/6YdX9 /pn42/cZAlIWn8/EkSeNPsEsIcYzkGCZ3Dyed4/45qRTe6gG/fcMsDKQrnK5GQ+mOYHl 7Ied/R4S7Jv8V9N0wdf4ynKpdN1pWMdG92f5PpxgC75BrpIQork0I/E/zv5ol9PbqI3i dJRY1/8+PemYrhcygGcp8tJQEsQbVPc3pAZOe2dkZ3I2b3O/bIavGHtuylkH62sT87XM /kQQ== 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=alXSIX3aVlQbR+ahH+ZLhiXZst3M9kUZiv2iZp+a95Y=; b=MwG+XaxO00Bwt+hohMIQ8hNo5vtiQz5CXOla4MHaPpSLekV4Z9rC8Fz14+HlGnIBd0 /CO5BvjiUTF1+Q9Y/3YMeOOS73W5pFbyFX00gcDl2N5TMUervSOj8b651+b2nMXx79Py UaYAuNA+LRN56Yuuuc/9ow6VY2jfmSx+4ZY4jsrtqpEw8lwzbzntinUW8sy+x4kPzWJa +UIFGc6P+uzeR88TmzkaHLipN9adYNTHwczaNccqJPJ4qcdfGa2m/MoRCfyk2yMHvKYU 4nxHd7ygbGFhXxtv7VVy/yvKCLkdL7WlS7KSFNDc7q4Xn9WZkSjP4LHxEr/UKhpSmymk k35g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lCu0jtZ/"; 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 fi12-20020a0562141a4c00b00441671b505esi2814492qvb.59.2022.03.26.06.35.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Mar 2022 06:35: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="lCu0jtZ/"; 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]:50546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nY6ZL-0001kc-0m for patch@linaro.org; Sat, 26 Mar 2022 09:35:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nY6QU-0006ww-Uf for qemu-devel@nongnu.org; Sat, 26 Mar 2022 09:25:54 -0400 Received: from [2607:f8b0:4864:20::22b] (port=45002 helo=mail-oi1-x22b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nY6QS-0005Ld-6D for qemu-devel@nongnu.org; Sat, 26 Mar 2022 09:25:54 -0400 Received: by mail-oi1-x22b.google.com with SMTP id t21so6202061oie.11 for ; Sat, 26 Mar 2022 06:25:51 -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=alXSIX3aVlQbR+ahH+ZLhiXZst3M9kUZiv2iZp+a95Y=; b=lCu0jtZ/X8jjLDdXgF35fC5uZeCKlSelXqx6UIHSvBMtox7fpxccKvkLtezfM+/4e3 Pmzd1kNZ9ieiuSjUhNCsLOINWIQwfUHb4EAT6WdJIzrWvs51b9OuJeCNjytSFxr+bHxA eA71zmYsETBdkTO5TpUsJ+rj2yqxsEILZ++6L+euUIXpiSxvak0xAR/ZBa4lo0caUZda 9xfmnktfibYds2BYr0XJK2vIQBDleQBmBXXK/9YU6ZVH6AgUSxDf8fzK1Kq3A5KF5iFl u+r+SHx0lib2iJf9ycB6sf1sU00Y/N3o9o1wMu56KuFIklFD6RIdPsJh/ugPmOLDV8iH CWbw== 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=alXSIX3aVlQbR+ahH+ZLhiXZst3M9kUZiv2iZp+a95Y=; b=X2aDjj1740ryMVItVfBvYg8PcGD944rFqWcbXrtBcFWpJpzP/SvPMXXHHNp1iLb+pC lj+ktW2VvfaHmx+fClXkkmpjxvtPjXQoXvOqEZw9RBMmFFRpE+k9H1v7WnGDMzWUcsPr mUAkS0AujTW9vpWP0co9LtPK1wpGQ0GRnwf1gfyqXyMEqM9uBdpvhXqBg+aEjmd19QS7 s8ylbRX3BLtaX/THPQ5skQk1ROhTJU/KJRki34aINrvSKvhRKHGoioBPJkcNGqx2NoVD qIe+5YNgxZueXXWeih+66FUr9f6N9WE9zzTYcqbeEOUzfI8XS6nqrpJzXQL3w9oV7ixb HpTA== X-Gm-Message-State: AOAM531hv5s6IRXJlRVgXRzMDbfPDFdfT0rSDrZF+R7AdlTqkdykwc0s znajXdCagekmjWfx/46ticAz8oHfUYHgjR6s X-Received: by 2002:a05:6808:23cc:b0:2d9:dc76:1f36 with SMTP id bq12-20020a05680823cc00b002d9dc761f36mr8093205oib.292.1648301151155; Sat, 26 Mar 2022 06:25:51 -0700 (PDT) Received: from localhost.localdomain (168.189-204-159.bestelclientes.com.mx. [189.204.159.168]) by smtp.gmail.com with ESMTPSA id n62-20020acaef41000000b002ef646e6690sm4610331oih.53.2022.03.26.06.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Mar 2022 06:25:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 05/39] os-posix: Use qemu_log_enabled Date: Sat, 26 Mar 2022 07:24:57 -0600 Message-Id: <20220326132534.543738-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220326132534.543738-1-richard.henderson@linaro.org> References: <20220326132534.543738-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::22b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22b.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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not reference qemu_logfile directly; use the predicate provided by qemu/log.h. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- os-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os-posix.c b/os-posix.c index 24692c8593..20d31fc518 100644 --- a/os-posix.c +++ b/os-posix.c @@ -292,7 +292,7 @@ void os_setup_post(void) dup2(fd, 0); dup2(fd, 1); /* In case -D is given do not redirect stderr to /dev/null */ - if (!qemu_logfile) { + if (!qemu_log_enabled()) { dup2(fd, 2); }