From nobody Wed Feb 11 00:55:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1650479391; cv=none; d=zohomail.com; s=zohoarc; b=KgMl/GzSMckKoRukF+6vPD3UtYas5ucGSuw8teK3kyaW++8CiIQBJJ5Cg578nd+s/AYxzyIL7+fSh//MmCm7H1jefdsubHFkx5XT4cbnCli6uSTWcywnNBcLEPkpwp5dujcTG+68zDJc8ijx6t94gfhykb668Zzk5ia8IEApWx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650479391; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ggCkE4H0GpylDO/t2+Oit+yU2z/D8eefxrTSlD31bcs=; b=GBzWF9rLcAAbJbv1IYrw8N7Ig/2Y5H1xp8v5zVbnb0ho4kopbQdeFvyAg3tPZowfBGBiqY1hpiv92Ppc4VjgKPnwnFYFVHDYKjPIrR6IIO9Lt5R2wDtCKst7WmfIUL5sl0WPXDSPvBEgepXrw1Q8inIIaODSWHHqfme6f2WRgrs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650479391969580.1219737895035; Wed, 20 Apr 2022 11:29:51 -0700 (PDT) Received: from localhost ([::1]:35846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhF5K-0004pq-OT for importer@patchew.org; Wed, 20 Apr 2022 14:29:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhEj9-0006RG-Ul for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:55 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:41887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhEj8-0001N8-CW for qemu-devel@nongnu.org; Wed, 20 Apr 2022 14:06:55 -0400 Received: by mail-pl1-x62c.google.com with SMTP id s14so2505758plk.8 for ; Wed, 20 Apr 2022 11:06:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:06:52 -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=ggCkE4H0GpylDO/t2+Oit+yU2z/D8eefxrTSlD31bcs=; b=Tg6rA8NJvLT2odlNnWZkXSs2ISzYkKnQ8qRrrgnvHXveiG8IuFT4+Ksmmg8lYmfGZ0 mG3h4wrK30x7GuGlw5jCChySypeVQZJ8vrfswfh2LWRSTMfD9J9N2JH1fPfxqdYGSt8g SdQyQ1VENYjWhYAXY41pafSri8GpQBD/9VmhlXaUprIWuw5l0pGQrzuWHS+bA3Qb1O8r ji4h+scdQfXofj4g/39xs42UyKTc7UBE0gdgpzi+Md5gibaxZaRogk33y2lKbOmu7PrV MH01zZ/OsulNAnrVgIfgDVDa7nn2tcBWM1kHsIibNm1RepHBIsJzsH8nuG5/3VNUDuGH r0Gw== 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=ggCkE4H0GpylDO/t2+Oit+yU2z/D8eefxrTSlD31bcs=; b=biRCwmcsCBRu9YACN+uH0AOgAn0P+v0fPT9vqpgLhbI6IURM/Z7HMNxhLzlZgh9wzg HAe5u0E0fMwNNBozIqTxD4FVJ8hXo7e1RP7JDhiaezWBQ7wNrT/qD30qZnkBh71Z0pQR 9HaLTxPBqkDc0XNtNKoFZp+gk18V3kYA/clFSFkePdKk9b0Jnr6vHKKrnXmY5aTli662 OJd4zr2N3TmKmnVSfWjM0RUp5hlt45Whr4mfdGZnUU8NmZ3nESe3KAIcWyxxy86x1yRx RNoqhzxySkiLdrNjvqVKU9L2+BIO9rDvfF17ymXUZMDeI3BW44xauqgPeHpxOjUPdz+7 dLTg== X-Gm-Message-State: AOAM53063PAYE1Bazt6xXDE5Vy/sgQ2RLFTey4TLDsVBqFIE3o/nL+Y5 6Lt6dT5PBfkvr2WlgCnF0RvRPvUEsFBupg== X-Google-Smtp-Source: ABdhPJwCfDih7K9viZj93TMP8NZVs1Io1ph50znxdoUxIdQoRIzX1wiQKoQHJ1x2OrXkwsNrBv4jSw== X-Received: by 2002:a17:902:f70b:b0:14d:643d:9c99 with SMTP id h11-20020a170902f70b00b0014d643d9c99mr22154719plo.18.1650478013067; Wed, 20 Apr 2022 11:06:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 32/39] util/log: Rename logfilename to global_filename Date: Wed, 20 Apr 2022 11:06:11 -0700 Message-Id: <20220420180618.1183855-33-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1650479392986100001 Rename to emphasize this is the file-scope global variable. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Message-Id: <20220417183019.755276-33-richard.henderson@linaro.org> --- util/log.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/util/log.c b/util/log.c index 491a8f97f9..b3f79deb6c 100644 --- a/util/log.c +++ b/util/log.c @@ -34,7 +34,7 @@ typedef struct QemuLogFile { FILE *fd; } QemuLogFile; =20 -static char *logfilename; +static char *global_filename; static QemuMutex qemu_logfile_mutex; static QemuLogFile *qemu_logfile; int qemu_loglevel; @@ -151,8 +151,8 @@ static bool qemu_set_log_internal(const char *filename,= bool changed_name, } } =20 - g_free(logfilename); - logfilename =3D newname; + g_free(global_filename); + global_filename =3D newname; filename =3D newname; =20 if (logfile) { @@ -161,7 +161,7 @@ static bool qemu_set_log_internal(const char *filename,= bool changed_name, logfile =3D NULL; } } else { - filename =3D logfilename; + filename =3D global_filename; } =20 #ifdef CONFIG_TRACE_LOG @@ -173,9 +173,8 @@ static bool qemu_set_log_internal(const char *filename,= bool changed_name, * In all cases we only log if qemu_loglevel is set. * Also: * If not daemonized we will always log either to stderr - * or to a file (if there is a logfilename). - * If we are daemonized, - * we will only log if there is a logfilename. + * or to a file (if there is a filename). + * If we are daemonized, we will only log if there is a filename. */ need_to_open_file =3D log_flags && (!is_daemonized() || filename); =20 --=20 2.34.1