Message ID | 20220420180618.1183855-33-richard.henderson@linaro.org |
---|---|
State | Accepted |
Commit | 422664648129689778ac9c9aa0a49a0f705ea53f |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp4414130map; Wed, 20 Apr 2022 11:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzewJRhjetwn0i7NQJT6wESvNeZckr/raf8QtvjKlf/WY8CGCAcrWF3lSB/ssA/80KGwGKF X-Received: by 2002:a81:8902:0:b0:2eb:e2fd:8a1d with SMTP id z2-20020a818902000000b002ebe2fd8a1dmr21996659ywf.516.1650479359728; Wed, 20 Apr 2022 11:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650479359; cv=none; d=google.com; s=arc-20160816; b=dxxfNXXa7a0f8xpaCTXkGjsfOeTFqyGzEb8V84y21C1ongHktTkALCi+qxqKpizbB3 XjRNfDn/j/D4Ebkr3lCmaz7x1wiY9EAZwmp6YBwEDxBK9u82ej/J0ybg3y+WlaV8M6Us z27tdB8c43/vU916zr8nGqOhe5ikiAw0ZrAxEolL7Cp4gdJhHvbpkoMMEuYmcjiSK8C+ c3WveKS/X7ZVaG9Tv2mxPqYoTQD6rfW4+AcmP2SL1pAvE72GeWiYMlXI/PhV2rCMZ3m6 t1x92lWsfNWXOupNfG4+xTQwSCYQzmTHkFPFqRDZWDJSJm3Knq0TE5lGzsLzWUBQ0VcG Oh5Q== 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=ggCkE4H0GpylDO/t2+Oit+yU2z/D8eefxrTSlD31bcs=; b=r9Q56RXsWa2Dd6Gkbsc1W2/7vfhgBRtkadVEuEp7ur8zjFl6Yooy9CS1fnss2ssj4J eAy3ZjbLQsgJNgEHb2lYR/2Zm8ieCVeGUeZZ0O6qhLj81BE2Dyjks+TyFhwR0RxVTK6J a0I2bdEfVlf56z3SbNvjvRhkR0/yA8QzHd+O59pK8X47UBrulobYdDg1sKWzNsspO6ZS oHWYVBblUQIFnaRLu3x+yBVb3vwE9W2o630Vp3urvcf8vLqrN0BxAJUdLn3McMUrCfXk kgR9RBoF9mtjuDaTX4A7QpfaLn3g77ha/2+V60wuvdi9APIPUtnn7k0vs3vRfTCW/WKR YLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tg6rA8NJ; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a133-20020a254d8b000000b00641bfa3b798si627531ybb.51.2022.04.20.11.29.19 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Apr 2022 11:29:19 -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=Tg6rA8NJ; 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]:60298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nhF4p-0002HX-7z for patch@linaro.org; Wed, 20 Apr 2022 14:29:19 -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 <richard.henderson@linaro.org>) 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 <richard.henderson@linaro.org>) 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 <qemu-devel@nongnu.org>; Wed, 20 Apr 2022 11:06:53 -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-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) 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) From: Richard Henderson <richard.henderson@linaro.org> 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: 8bit 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= <f4bug@amsat.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
[PULL,01/39] util/log: Drop manual log buffering
|
expand
|
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; -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, } } - g_free(logfilename); - logfilename = newname; + g_free(global_filename); + global_filename = newname; filename = newname; if (logfile) { @@ -161,7 +161,7 @@ static bool qemu_set_log_internal(const char *filename, bool changed_name, logfile = NULL; } } else { - filename = logfilename; + filename = global_filename; } #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 = log_flags && (!is_daemonized() || filename);