From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YswQu-0001Pv-OS for qemu-devel@nongnu.org; Thu, 14 May 2015 12:56:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YswQr-0002Jy-Fp for qemu-devel@nongnu.org; Thu, 14 May 2015 12:56:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YswQr-0002I5-8Z for qemu-devel@nongnu.org; Thu, 14 May 2015 12:56:25 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4EGuNak032691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 14 May 2015 12:56:24 -0400 Message-ID: <5554D3B6.5090806@redhat.com> Date: Thu, 14 May 2015 10:56:22 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431432187-10993-1-git-send-email-armbru@redhat.com> <1431432187-10993-7-git-send-email-armbru@redhat.com> In-Reply-To: <1431432187-10993-7-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3urC2ni3gvEFml6toUDgoG28pIq1S2vjX" Subject: Re: [Qemu-devel] [PATCH 06/15] tap: Improve -netdev/netdev_add/-net/... bridge error reporting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3urC2ni3gvEFml6toUDgoG28pIq1S2vjX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/12/2015 06:02 AM, Markus Armbruster wrote: > When -netdev bridge fails, it first reports a specific error, then a > generic one, like this: >=20 > $ qemu-system-x86_64 -netdev bridge,id=3Dfoo > failed to launch bridge helper > qemu-system-x86_64: -netdev bridge,id=3Dfoo: Device 'bridge' could = not be initialized >=20 > The first message goes to stderr. Wrong for HMP, because errors need > to go to the monitor there. >=20 > The second message goes to stderr for -netdev, to the monitor for HMP > netdev_add, and becomes the error reply for QMP netdev_add. >=20 > Convert net_bridge_run_helper() to Error, and propagate its errors > through net_init_bridge(). This ensures the error gets reported where > the user is, and suppresses the unwanted second message. >=20 > While there, improve the error messages a bit. >=20 > The above example becomes: >=20 > $ qemu-system-x86_64 -netdev bridge,id=3Dfoo > qemu-system-x86_64: -netdev bridge,id=3Dfoo: bridge helper failed >=20 > net_init_tap() also uses net_bridge_run_helper(). Propagate its > errors there as well. Improves reporting these errors with -netdev > tap & friends. >=20 > Signed-off-by: Markus Armbruster > --- > net/tap.c | 30 +++++++++++++++++++----------- > 1 file changed, 19 insertions(+), 11 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --3urC2ni3gvEFml6toUDgoG28pIq1S2vjX 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/ iQEcBAEBCAAGBQJVVNO2AAoJEKeha0olJ0NqGZkH/RsMMHV/JfvoX+ocLjH7Kojz eEZXeLrT3tB8SOqjMc3jCCB1r4FujxAskO1zoRMPSZJNQ9P1RLWdV+9KzMj5MvwM 6z6QDVkVFjfvTVnrFQ04ocV6c1JrxvXzZwP3s++fdXlsV8RARXhLzyAEHFvDwfB7 H1exh+34FiCRicXNZGBmDsaWwCPEJzTty02UBaQGZFJ+Hz9l/riqvEG8Ylf9ir4d /3zZ9cSP84INDpDIDzoWZD73WVXZ++za09jseRjckMeEennkQ//lcJzS0zO4lW0i UJfKEJazwFkCTc0lC5lTxrczxLJdjju5BuYRnIfAD4jJhuO0IgbsAD6rb/b/q6Y= =SPdQ -----END PGP SIGNATURE----- --3urC2ni3gvEFml6toUDgoG28pIq1S2vjX--