Received: from eggs.gnu.org ([209.51.188.92]:42647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIxw0-00083M-BA for qemu-devel@nongnu.org; Tue, 23 Apr 2019 12:06:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIxvy-0007ac-Dw for qemu-devel@nongnu.org; Tue, 23 Apr 2019 12:06:16 -0400 From: Thomas Huth Date: Tue, 23 Apr 2019 18:06:08 +0200 Message-Id: <20190423160608.7519-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] net: Print output of "-net nic, model=help" to stdout instead of stderr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org We are printing all other help output to stdout already (e.g. "-help", "-cpu help" and "-machine help" output). So the "-net nic,model=3Dhelp" output should go to stdout instead of stderr, too. And while we're at it, also print the NICs line by line, like we do it e.g. with the "-cpu help" or "-M help" output, too. Buglink: https://bugs.launchpad.net/qemu/+bug/1574327 Signed-off-by: Thomas Huth --- net/net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/net.c b/net/net.c index f3a3c5444c..2cf5e76469 100644 --- a/net/net.c +++ b/net/net.c @@ -837,9 +837,10 @@ int qemu_show_nic_models(const char *arg, const char= *const *models) return 0; } =20 - fprintf(stderr, "qemu: Supported NIC models: "); - for (i =3D 0 ; models[i]; i++) - fprintf(stderr, "%s%c", models[i], models[i+1] ? ',' : '\n'); + printf("Supported NIC models:\n"); + for (i =3D 0 ; models[i]; i++) { + printf("%s\n", models[i]); + } return 1; } =20 --=20 2.21.0