From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:49042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDPld-0008CU-Di for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDPlc-0003hg-EQ for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41204) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hDPlc-0003gc-4J for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:36 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60391821F3 for ; Mon, 8 Apr 2019 08:36:35 +0000 (UTC) From: Markus Armbruster Date: Mon, 8 Apr 2019 10:36:26 +0200 Message-Id: <20190408083627.7479-15-armbru@redhat.com> In-Reply-To: <20190408083627.7479-1-armbru@redhat.com> References: <20190408083627.7479-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 14/15] char: Make -chardev help print to stdout List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Command line help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -chardev to match: use qemu_printf() instead of error_printf(). Plain printf() would be wrong because we need to print to the current monitor for chardev-add help". Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Signed-off-by: Markus Armbruster --- chardev/char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 514cd6b0c3..54724a56b1 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -28,6 +28,7 @@ #include "sysemu/sysemu.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "qemu/qemu-print.h" #include "chardev/char.h" #include "qapi/error.h" #include "qapi/qapi-commands-char.h" @@ -651,7 +652,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMain= Context *context, =20 chardev_name_foreach(help_string_append, str); =20 - error_printf("Available chardev backend types: %s\n", str->str); + qemu_printf("Available chardev backend types: %s\n", str->str); g_string_free(str, true); return NULL; } --=20 2.17.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 617C9C282CE for ; Mon, 8 Apr 2019 08:41:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3518120880 for ; Mon, 8 Apr 2019 08:41:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3518120880 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:49410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDPqE-0003dH-FM for qemu-devel@archiver.kernel.org; Mon, 08 Apr 2019 04:41:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDPld-0008CU-Di for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDPlc-0003hg-EQ for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41204) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hDPlc-0003gc-4J for qemu-devel@nongnu.org; Mon, 08 Apr 2019 04:36:36 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60391821F3 for ; Mon, 8 Apr 2019 08:36:35 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED06F6013A; Mon, 8 Apr 2019 08:36:32 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 1958811327DB; Mon, 8 Apr 2019 10:36:28 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 8 Apr 2019 10:36:26 +0200 Message-Id: <20190408083627.7479-15-armbru@redhat.com> In-Reply-To: <20190408083627.7479-1-armbru@redhat.com> References: <20190408083627.7479-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 08 Apr 2019 08:36:35 +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 14/15] char: Make -chardev help print to stdout 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Message-ID: <20190408083626.zZh9QyIohFF5gxCQCycKxdtpwWyjmV-j0XVcQFTUnvg@z> Command line help explicitly requested by the user should be printed to stdout, not stderr. We do elsewhere. Adjust -chardev to match: use qemu_printf() instead of error_printf(). Plain printf() would be wrong because we need to print to the current monitor for chardev-add help". Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Signed-off-by: Markus Armbruster --- chardev/char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 514cd6b0c3..54724a56b1 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -28,6 +28,7 @@ #include "sysemu/sysemu.h" #include "qemu/config-file.h" #include "qemu/error-report.h" +#include "qemu/qemu-print.h" #include "chardev/char.h" #include "qapi/error.h" #include "qapi/qapi-commands-char.h" @@ -651,7 +652,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMain= Context *context, =20 chardev_name_foreach(help_string_append, str); =20 - error_printf("Available chardev backend types: %s\n", str->str); + qemu_printf("Available chardev backend types: %s\n", str->str); g_string_free(str, true); return NULL; } --=20 2.17.2