From nobody Tue Feb 10 02:00:35 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1657619045; cv=none; d=zohomail.com; s=zohoarc; b=djxMDDuNvKcJmkZDu1nsKRa0oc6RQ8MUpM4Yj5zI/Xr5s+2Two5TUMDOfFPvNlWV5GX8RuFIPQCGHYS2t6ldlNuIadN3ULWokMI08xdyOZ5XNPegIx/T4zz1zFOSgsja1k9lcqCjV5APGxmhttAY9awauHTXhnAb+t6xLhoCFq0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657619045; 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=RzBc0nl4yI9EOA558uood9/BjlvTEJkzBDosBBKzsnk=; b=Ub458onCjiKR+LPvG/B2qpPb70X5pqMp4+OSfDeT8z0R/Jvl+GLW6oU2W8F8KlueRUw3G3l1MFLpGKqSqbe+LdD9VxSr9GuYpyuHe7zy7TyzVkS4m2MRHw+yz734C8UTmHrPoMGS2ag2ZMoosV0Lhl417rJKNBtbLJNXDjxzplY= 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 1657619045366380.0575937277557; Tue, 12 Jul 2022 02:44:05 -0700 (PDT) Received: from localhost ([::1]:36598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBCR1-0005BM-Df for importer@patchew.org; Tue, 12 Jul 2022 05:44:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBCJ9-0005I1-Et for qemu-devel@nongnu.org; Tue, 12 Jul 2022 05:35:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBCJ7-0006Vj-HP for qemu-devel@nongnu.org; Tue, 12 Jul 2022 05:35:55 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-427-FKTduMrANg2r4WvaBzKfVg-1; Tue, 12 Jul 2022 05:35:49 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FF3F811E7A; Tue, 12 Jul 2022 09:35:49 +0000 (UTC) Received: from localhost (unknown [10.39.208.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13AD9492C3B; Tue, 12 Jul 2022 09:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1657618552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RzBc0nl4yI9EOA558uood9/BjlvTEJkzBDosBBKzsnk=; b=PoRUXeDMpGgaOZng/G+1WT3RucGbf//0w/Vbrtuxd4/wkDUKLGfQuooJZHTgVMmlPFHS5J Cgh0OJi64N4VdE9MYLUuAYNB4y/cNBuFlemnv/L01FWV7QjmYtQ2gN2Z0zMZsE/1+yV2X1 NXD9V30WGrXLoskgJ6xgrdH3lAJO4fE= X-MC-Unique: FKTduMrANg2r4WvaBzKfVg-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Eric Blake , Cleber Rosa , qemu-block@nongnu.org, Paolo Bonzini , Xie Yongji , Kyle Evans , Peter Maydell , John Snow , Michael Roth , Warner Losh , Kevin Wolf , "Dr. David Alan Gilbert" , Markus Armbruster , Vladimir Sementsov-Ogievskiy , Laurent Vivier , Fam Zheng , Hanna Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 02/15] error-report: introduce "detailed" variable Date: Tue, 12 Jul 2022 13:35:15 +0400 Message-Id: <20220712093528.4144184-3-marcandre.lureau@redhat.com> In-Reply-To: <20220712093528.4144184-1-marcandre.lureau@redhat.com> References: <20220712093528.4144184-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1657619047545100001 From: Marc-Andr=C3=A9 Lureau Let's use a more explicit variable "detailed" instead of calling monitor_cur() multiple times. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Markus Armbruster --- util/error-report.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/error-report.c b/util/error-report.c index 98f242b75bbf..893da10f19bc 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -195,16 +195,17 @@ real_time_iso8601(void) */ static void vreport(report_type type, const char *fmt, va_list ap) { + bool detailed =3D !monitor_cur(); gchar *timestr; =20 - if (message_with_timestamp && !monitor_cur()) { + if (message_with_timestamp && detailed) { timestr =3D real_time_iso8601(); error_printf("%s ", timestr); g_free(timestr); } =20 /* Only prepend guest name if -msg guest-name and -name guest=3D... ar= e set */ - if (error_with_guestname && error_guest_name && !monitor_cur()) { + if (error_with_guestname && error_guest_name && detailed) { error_printf("%s ", error_guest_name); } =20 --=20 2.37.0.rc0