From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy3M0-0007hk-NQ for qemu-devel@nongnu.org; Thu, 28 May 2015 15:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy3Lv-000644-OG for qemu-devel@nongnu.org; Thu, 28 May 2015 15:20:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy3Lv-00063A-Hn for qemu-devel@nongnu.org; Thu, 28 May 2015 15:20:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 0E0AB37C806 for ; Thu, 28 May 2015 19:20:26 +0000 (UTC) Message-ID: <55676A74.2090106@redhat.com> Date: Thu, 28 May 2015 13:20:20 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432815695-31687-1-git-send-email-armbru@redhat.com> <1432815695-31687-10-git-send-email-armbru@redhat.com> In-Reply-To: <1432815695-31687-10-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wAsIGom6wpVSbkLrnaS6RwkoChvrFuwf5" 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 , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Jason Wang , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wAsIGom6wpVSbkLrnaS6RwkoChvrFuwf5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/28/2015 06:21 AM, 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: char= dev "xxx" not found > qemu-system-x86_64: -netdev vhost-user,id=3Dfoo,chardev=3Dxxx: No s= uitable chardev found > qemu-system-x86_64: -netdev vhost-user,id=3Dfoo,chardev=3Dxxx: Devi= ce '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(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wAsIGom6wpVSbkLrnaS6RwkoChvrFuwf5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVZ2p1AAoJEKeha0olJ0Nq6J4H/j9TWJObcZelUmNLf2gVo7LF gDCYZeYvtLg+xHzkvvJZGIpHe+hw6QBWgxhnQ8P8paB4cnlgDzc8kJ38K00z9ENF wC01pCsLM0YD3AuNrUL+QxWR4BO9Wv1drYFRsmnDZDifUIMjao7YZuW6TdTiz4kg LAldymmH2AfSIbx6av5EHIxBSPWCOs1U/ZUgXr4lIu9F7AnRhvE+DxxzC2B2qIzL duYELeSBoSsh0kPygth/SMcgVhxJIUNcux2ri//fGMF2pze6fCgonUmI+WA2eOuv fK2hma221OX4N/Ww9gWmzo5i680ol/wZQRcL1F3uWr0+ddWEr00lQq9miT1lyu4= =qmDo -----END PGP SIGNATURE----- --wAsIGom6wpVSbkLrnaS6RwkoChvrFuwf5--