From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp6p-0007Rt-Fx for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:32:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzp6n-000052-Sd for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:32:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzp6n-0008WQ-NL for qemu-devel@nongnu.org; Tue, 02 Jun 2015 12:32:09 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id EBAE12CAB73 for ; Tue, 2 Jun 2015 16:32:08 +0000 (UTC) Date: Tue, 2 Jun 2015 17:32:07 +0100 From: Stefan Hajnoczi Message-ID: <20150602163207.GH8199@stefanha-thinkpad.redhat.com> References: <1432815695-31687-1-git-send-email-armbru@redhat.com> <1432815695-31687-10-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="N8ia4yKhAKKETby7" Content-Disposition: inline In-Reply-To: <1432815695-31687-10-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 9/9] vhost-user: Improve -netdev/netdev_add/-net/... error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: pbonzini@redhat.com, Jason Wang , qemu-devel@nongnu.org --N8ia4yKhAKKETby7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 28, 2015 at 02:21:35PM +0200, Markus Armbruster wrote: > When -netdev vhost-user fails, it first reports a specific error, then > one or more generic ones, like this: >=20 > $ qemu-system-x86_64 -netdev vhost-user,id=3Dfoo,chardev=3Dxxx > qemu-system-x86_64: -netdev vhost-user,id=3Dfoo,chardev=3Dxxx: charde= v "xxx" not found > qemu-system-x86_64: -netdev vhost-user,id=3Dfoo,chardev=3Dxxx: No sui= table chardev found > qemu-system-x86_64: -netdev vhost-user,id=3Dfoo,chardev=3Dxxx: Device= 'vhost-user' could not be initialized >=20 > With the command line, the messages go to stderr. In HMP, they go to > the monitor. In QMP, the last one becomes the error reply, and the > others go to stderr. >=20 > Convert net_init_vhost_user() and its helpers to Error. This > suppresses the unwanted unspecific error messages, and makes the > specific error the QMP error reply. >=20 > Cc: Stefan Hajnoczi > Cc: Jason Wang > Signed-off-by: Markus Armbruster > --- > net/vhost-user.c | 27 ++++++++++++--------------- > 1 file changed, 12 insertions(+), 15 deletions(-) Reviewed-by: Stefan Hajnoczi --N8ia4yKhAKKETby7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVbdqHAAoJEJykq7OBq3PImJwH/j64yIqebKJoF1sKaRXuQMVw DljtqQ2EG6lW/n7kiYnDIwtKgNTexvRsRsgdB5Q1feHc6/Lgw8HOC88doh3h8L8C FUdWSA6lD9QbFyVIP2gw0YoG0agR+C3ytWyqLTtybCCyyShttFouBp3hzGlytZeD CDfnrHyDNLkQXtkfyJzGL0TGhV8nILN3NlhWH73pjkahHosan4HLO2zwKaAIkFjE 6s9PNALOU8VmJXgMB9evFJPXsTh1ltK2vsw8Cux6Rdb8ddb0G0mNcph4hc9RlEox 61spAznFspg5apnB1zvSL2xfYoxV1pwoSHTUQSyB95nYngJt/ZV2TcANfJwywYQ= =PGMN -----END PGP SIGNATURE----- --N8ia4yKhAKKETby7--