From nobody Thu Nov 6 08:25:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153971225319454.90054059692909; Tue, 16 Oct 2018 10:50:53 -0700 (PDT) Received: from localhost ([::1]:59387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCTUW-0004WB-6d for importer@patchew.org; Tue, 16 Oct 2018 13:50:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCTM9-00064g-9z for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCTM7-00008o-4B for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCTM6-000078-Oi for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:06 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C96C43091751 for ; Tue, 16 Oct 2018 17:42:05 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BAF6C53C2E; Tue, 16 Oct 2018 17:42:01 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id BCC961132D3E; Tue, 16 Oct 2018 19:41:58 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 16 Oct 2018 19:41:27 +0200 Message-Id: <20181016174158.15229-8-armbru@redhat.com> In-Reply-To: <20181016174158.15229-1-armbru@redhat.com> References: <20181016174158.15229-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 16 Oct 2018 17:42:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 07/38] char: Use error_printf() to print help and such X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Calling error_report() in a function that takes an Error ** argument is suspicious. Convert a few that are actually help and such to error_printf(). Improves output of -chardev help from qemu-system-x86_64: -chardev help: Available chardev backend types: serial ... to Available chardev backend types: serial ... Cc: Paolo Bonzini Cc: "Marc-Andr=C3=A9 Lureau" Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- chardev/char-pty.c | 2 +- chardev/char.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index e8d9a53476..f681d637c1 100644 --- a/chardev/char-pty.c +++ b/chardev/char-pty.c @@ -259,7 +259,7 @@ static void char_pty_open(Chardev *chr, qemu_set_nonblock(master_fd); =20 chr->filename =3D g_strdup_printf("pty:%s", pty_name); - error_report("char device redirected to %s (label %s)", + error_printf("char device redirected to %s (label %s)\n", pty_name, chr->label); =20 s =3D PTY_CHARDEV(chr); diff --git a/chardev/char.c b/chardev/char.c index e115166995..7f07a1bfbd 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -634,7 +634,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, Error *= *errp) =20 chardev_name_foreach(help_string_append, str); =20 - error_report("Available chardev backend types: %s", str->str); + error_printf("Available chardev backend types: %s\n", str->str); g_string_free(str, true); return NULL; } --=20 2.17.1