From nobody Mon Feb 9 14:00:19 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1768394874; cv=none; d=zohomail.com; s=zohoarc; b=aBSUEZY9GC186HjqvfW4O8A/t6BNSYPq5ZzxmhxPWxCEVlx9liRYGL2yJ26SsfT9e0VZ5LOKXY6KG+ikctjLiLOzXr360+yVYfWAXayHX8HeKX1INWJXg/bzN5HSuhC7iZfVnxPRKznYp0QWiVOelC4MPxG6WK9imt+w6hgrwzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768394874; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zxpmqsakgJ0BYcMpa+6PbTMXSVujm+9u46ujIPqDxsc=; b=I9LbOhWQv6FD+53MmxyK3TTlj4WVB0HlDEyPnLPIjB6id56ak0FsCQ66qoFBoInNrs65EI+uU6DR+RuKWvJKgwlNNMzwckagR5MsVhwM3fng5Z61xPkcWfnsfcf3FEnWY0NLginCtm9wnSSr8aiOvKzUEpdBGkc7HPnqGjBWBp4= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768394874165222.43776109625026; Wed, 14 Jan 2026 04:47:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vg0Hq-0005zu-W6; Wed, 14 Jan 2026 07:47:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HX-0005sy-He for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HR-0002DA-EM for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:25 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-360-zjrGWvqZNvqYbAJvaWwq5A-1; Wed, 14 Jan 2026 07:47:17 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0B6E419560B4; Wed, 14 Jan 2026 12:47:17 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.32]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 40E05180066A; Wed, 14 Jan 2026 12:47:16 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9C7B621E692F; Wed, 14 Jan 2026 13:47:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768394839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zxpmqsakgJ0BYcMpa+6PbTMXSVujm+9u46ujIPqDxsc=; b=QdV+gkx5EWJ09p/ACHny5NNM6GvbfjXZAR5A95Da2QoFDtRs/xWv1cb4w/sfTkMzF/3tqv Y6vaEN2vaJxC2vmV611TUZui4XmXMN1Vrw1Vi/5aaLQlRchg0YOR78oUZdtMfK0enSsGHl wsR+7z3x3GzkwELP0fs9JiiPzXnvPO4= X-MC-Unique: zjrGWvqZNvqYbAJvaWwq5A-1 X-Mimecast-MFC-AGG-ID: zjrGWvqZNvqYbAJvaWwq5A_1768394837 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: berrange@redhat.com, dave@treblig.org Subject: [PATCH 1/3] error: Fix "to current monitor if we have one" comments Date: Wed, 14 Jan 2026 13:47:11 +0100 Message-ID: <20260114124713.3308719-2-armbru@redhat.com> In-Reply-To: <20260114124713.3308719-1-armbru@redhat.com> References: <20260114124713.3308719-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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 (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.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1768394876580158500 Content-Type: text/plain; charset="utf-8" A number of print functions are documented to print to "current monitor if we have one, else stderr". Wrong, they print to the current monitor only when it's HMP. This is the case since commit 4ad417baa43 (error: Print error_report() to stderr if using qmp). Fix the comments to say "current HMP monitor if we have one". Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 --- include/qapi/error.h | 3 ++- monitor/monitor.c | 2 +- util/error-report.c | 26 ++++++++++++++++---------- util/qemu-print.c | 4 ++-- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 2356b84bb3..d1d37fc656 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -64,7 +64,8 @@ * * =3D Reporting and destroying errors =3D * - * Report an error to the current monitor if we have one, else stderr: + * Report an error to the current HMP monitor if we have one, else + * stderr: * error_report_err(err); * This frees the error object. * diff --git a/monitor/monitor.c b/monitor/monitor.c index 1273eb7260..c42d9fad58 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -269,7 +269,7 @@ void monitor_printc(Monitor *mon, int c) } =20 /* - * Print to current monitor if we have one, else to stderr. + * Print to current HMP monitor if we have one, else to stderr. */ int error_vprintf(const char *fmt, va_list ap) { diff --git a/util/error-report.c b/util/error-report.c index 1b17c11de1..f051f29b2d 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -136,7 +136,8 @@ void loc_set_file(const char *fname, int lno) } =20 /* - * Print current location to current monitor if we have one, else to stder= r. + * Print current location to current HMP monitor if we have one, else + * to stderr. */ static void print_loc(void) { @@ -177,7 +178,8 @@ real_time_iso8601(void) } =20 /* - * Print a message to current monitor if we have one, else to stderr. + * Print a message to current HMP monitor if we have one, else to + * stderr. * @report_type is the type of message: error, warning or informational. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. @@ -217,7 +219,8 @@ static void vreport(report_type type, const char *fmt, = va_list ap) } =20 /* - * Print an error message to current monitor if we have one, else to stder= r. + * Print an error message to current HMP monitor if we have one, else + * to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -229,7 +232,8 @@ void error_vreport(const char *fmt, va_list ap) } =20 /* - * Print a warning message to current monitor if we have one, else to stde= rr. + * Print a warning message to current HMP monitor if we have one, else + * to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -240,8 +244,8 @@ void warn_vreport(const char *fmt, va_list ap) } =20 /* - * Print an information message to current monitor if we have one, else to - * stderr. + * Print an information message to current HMP monitor if we have one, + * else to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -252,7 +256,8 @@ void info_vreport(const char *fmt, va_list ap) } =20 /* - * Print an error message to current monitor if we have one, else to stder= r. + * Print an error message to current HMP monitor if we have one, else + * to stderr. * Format arguments like sprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -268,7 +273,8 @@ void error_report(const char *fmt, ...) } =20 /* - * Print a warning message to current monitor if we have one, else to stde= rr. + * Print a warning message to current HMP monitor if we have one, else + * to stderr. * Format arguments like sprintf(). The resulting message should be a * single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -283,8 +289,8 @@ void warn_report(const char *fmt, ...) } =20 /* - * Print an information message to current monitor if we have one, else to - * stderr. + * Print an information message to current HMP monitor if we have one, + * else to stderr. * Format arguments like sprintf(). The resulting message should be a * single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. diff --git a/util/qemu-print.c b/util/qemu-print.c index 69ba612f56..4a30cd1a8e 100644 --- a/util/qemu-print.c +++ b/util/qemu-print.c @@ -16,7 +16,7 @@ =20 /* * Print like vprintf(). - * Print to current monitor if we have one, else to stdout. + * Print to current HMP monitor if we have one, else to stdout. */ int qemu_vprintf(const char *fmt, va_list ap) { @@ -29,7 +29,7 @@ int qemu_vprintf(const char *fmt, va_list ap) =20 /* * Print like printf(). - * Print to current monitor if we have one, else to stdout. + * Print to current HMP monitor if we have one, else to stdout. */ int qemu_printf(const char *fmt, ...) { --=20 2.52.0 From nobody Mon Feb 9 14:00:19 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1768394894; cv=none; d=zohomail.com; s=zohoarc; b=d/qkNblBpqGrjlkIvVpFzNGBG6fea1OdBCwC+Gtw1KUmpN01nytadeM7fl2bEjYCpAcVx//35vq/4jIPSp29z54zGRRwbxCk0m5gxq/G66kybg5ZPHt/2rkvSqFthKrBye6A4NzET0qYUZDQWo3yb8+ZpQtqFJFpciNYNKkZIOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768394894; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PntajisC8njaCy71Ybp4/FdRN4ipfhaZSgrGYuu0XY4=; b=PhhLnMvkuc5GR2qB2fBNcLz44+7ZXA89DfnqXKggH6T1RD8a7D3yTgRRXlPFRrBlSfwy048x2MgessdmBCo5QNFhvZ3Ucz1LbKrBykk+daHhe5Pe7vFpHCm8n4sCglmluxbTE6p3pB1rmwvyyu0jBYF8LhcJZfluDJhGpTysxO4= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176839489404743.5325104359805; Wed, 14 Jan 2026 04:48:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vg0Ht-00062J-7S; Wed, 14 Jan 2026 07:47:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HZ-0005tB-MV for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HV-0002DP-C5 for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:28 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-348-sx913RTCOQyrarFz6Cj08w-1; Wed, 14 Jan 2026 07:47:17 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8380818005A7; Wed, 14 Jan 2026 12:47:16 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.32]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D5C11800240; Wed, 14 Jan 2026 12:47:16 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A036121E6932; Wed, 14 Jan 2026 13:47:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768394840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PntajisC8njaCy71Ybp4/FdRN4ipfhaZSgrGYuu0XY4=; b=JWfOo2DtogNiGQLe6Gs4zAcvqyLwkNqdLKURM+KyY6f9StvR/anEluBk+TPAObcbWZ83Yb bGwblWKUXFQE03ng5g6ovBvUuhgWHLEV0RjfBXiI1aQHzv/o0Mj6OKbbMf/D7B2J0sgg5z lm8VJCgoSzs26bJlubAzRf3xLHH0TwA= X-MC-Unique: sx913RTCOQyrarFz6Cj08w-1 X-Mimecast-MFC-AGG-ID: sx913RTCOQyrarFz6Cj08w_1768394836 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: berrange@redhat.com, dave@treblig.org Subject: [PATCH 2/3] error: Restore error_printf()'s function comment Date: Wed, 14 Jan 2026 13:47:12 +0100 Message-ID: <20260114124713.3308719-3-armbru@redhat.com> In-Reply-To: <20260114124713.3308719-1-armbru@redhat.com> References: <20260114124713.3308719-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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 (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.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1768394896524158500 Content-Type: text/plain; charset="utf-8" Lost in commit 397d30e9401 (qemu-error: remove dependency of stubs on monitor) many moons ago. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 --- util/error-report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/error-report.c b/util/error-report.c index f051f29b2d..0b1c214dc7 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -29,6 +29,9 @@ bool message_with_timestamp; bool error_with_guestname; const char *error_guest_name; =20 +/* + * Print to current HMP monitor if we have one, else to stderr. + */ int error_printf(const char *fmt, ...) { va_list ap; --=20 2.52.0 From nobody Mon Feb 9 14:00:19 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1768394880; cv=none; d=zohomail.com; s=zohoarc; b=fHYJKXgZYj+xw5iEGUKP4DeDTPdN5c4ryFcXzJi/dhmvwPr5r7+EBfWRo/B3Z8J2GEcWy2tlsMIJgIQmxl+QI/MrQqIlv6BPpYn1HuwRpfALOs3f53IHk8CYp9XPO44yeF+PBzzJaCjaGHcm34vEYke06PVRjJYyGb3es5pSRLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768394880; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0DcdU8cbY30HHoc3hMjLD0zlToFc9lRwGcPv0TnFyog=; b=kOm35qUVHel5uXiUlULpLIkDGSRVKLoOCqlywZqufXdQYSnUMz86ikpKj0nudd0UnQdy4GngqqfKUUokGUSKXGAg1oCziK/yYsZ4g8oMsBok1PAr2T2/F0l44WYMsiiAlwxUssdCLpLo0if+tGCNQn60I5ToRpWOBydYRfbK64U= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768394880188469.9156411161624; Wed, 14 Jan 2026 04:48:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vg0Hr-00060A-3A; Wed, 14 Jan 2026 07:47:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HX-0005t0-Hm for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vg0HT-0002DR-9Q for qemu-devel@nongnu.org; Wed, 14 Jan 2026 07:47:26 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-522-0Q8AIvuQNjGwPzX5zmqssQ-1; Wed, 14 Jan 2026 07:47:17 -0500 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9CF9D180057E; Wed, 14 Jan 2026 12:47:16 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.32]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 379F530002D8; Wed, 14 Jan 2026 12:47:16 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A402321E6933; Wed, 14 Jan 2026 13:47:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768394840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0DcdU8cbY30HHoc3hMjLD0zlToFc9lRwGcPv0TnFyog=; b=LhIb8uroKcjfjQzEAZIOkDmENqcFdLfS4PfZAGuwRJjnnjjyZ0KGh1bxx3Jw4yq16qyiCU WajyBzMHgA8mRMOMVGnf4V38q5QVApAHBRsBJIDmdjFL+h0Le9XT0UH2S4QxMvmT+xvvuZ JFYOaWiOn1dX0Mc0vuvPphngsJWlzcE= X-MC-Unique: 0Q8AIvuQNjGwPzX5zmqssQ-1 X-Mimecast-MFC-AGG-ID: 0Q8AIvuQNjGwPzX5zmqssQ_1768394836 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: berrange@redhat.com, dave@treblig.org Subject: [PATCH 3/3] qemu-print: Document qemu_fprintf(), qemu_vfprintf() failure Date: Wed, 14 Jan 2026 13:47:13 +0100 Message-ID: <20260114124713.3308719-4-armbru@redhat.com> In-Reply-To: <20260114124713.3308719-1-armbru@redhat.com> References: <20260114124713.3308719-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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 (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.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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 development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1768394882436158500 Content-Type: text/plain; charset="utf-8" These functions fail when @stream is null and the current monitor isn't HMP. Signed-off-by: Markus Armbruster --- util/qemu-print.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-print.c b/util/qemu-print.c index 4a30cd1a8e..bbf8c1823e 100644 --- a/util/qemu-print.c +++ b/util/qemu-print.c @@ -45,6 +45,7 @@ int qemu_printf(const char *fmt, ...) /* * Print like vfprintf() * Print to @stream if non-null, else to current monitor. + * Beware: the latter fails unless we have one and it is HMP. */ int qemu_vfprintf(FILE *stream, const char *fmt, va_list ap) { @@ -57,6 +58,7 @@ int qemu_vfprintf(FILE *stream, const char *fmt, va_list = ap) /* * Print like fprintf(). * Print to @stream if non-null, else to current monitor. + * Beware: the latter fails unless we have one and it is HMP. */ int qemu_fprintf(FILE *stream, const char *fmt, ...) { --=20 2.52.0