From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuj3T-0006Zb-Va for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:35:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zuj3Q-0002iy-Na for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:35:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuj3Q-0002in-Cp for qemu-devel@nongnu.org; Fri, 06 Nov 2015 10:35:52 -0500 References: <896ac39693833166f8ab806c557bc6552226a773.1446822384.git.v.maffione@gmail.com> From: Eric Blake Message-ID: <563CC8D6.9070904@redhat.com> Date: Fri, 6 Nov 2015 08:35:50 -0700 MIME-Version: 1.0 In-Reply-To: <896ac39693833166f8ab806c557bc6552226a773.1446822384.git.v.maffione@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UqI6mHtw4npeC6dfw2B7obdtSOtigGKhb" Subject: Re: [Qemu-devel] [PATCH v2 2/2] net: netmap: use error_setg_errno() in place of error_report() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione , qemu-devel@nongnu.org Cc: jasowang@redhat.com, rizzo@iet.unipi.it, g.lettieri@iet.unipi.it, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UqI6mHtw4npeC6dfw2B7obdtSOtigGKhb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/06/2015 08:13 AM, Vincenzo Maffione wrote: > This update was required to align error reporting of netmap backend > initialization to the modifications introduced by commit a30ecde. >=20 > Signed-off-by: Vincenzo Maffione > --- > net/clients.h | 4 ++-- > net/netmap.c | 32 ++++++++++++++++---------------- > 2 files changed, 18 insertions(+), 18 deletions(-) >=20 > +++ b/net/netmap.c > @@ -99,9 +99,9 @@ static int netmap_open(NetmapPriv *me) > =20 > me->fd =3D fd =3D open(me->fdname, O_RDWR); > if (fd < 0) { > - error_report("Unable to open netmap device '%s' (%s)", > - me->fdname, strerror(errno)); > - return -1; > + error_setg_errno(errp, errno, "Unable to open netmap device '%= s'", > + me->fdname); We have error_setg_file_open() for reporting open() failures, if consistent messages are desired. > @@ -125,11 +124,12 @@ static int netmap_open(NetmapPriv *me) > me->nifp =3D NETMAP_IF(me->mem, req.nr_offset); > me->tx =3D NETMAP_TXRING(me->nifp, 0); > me->rx =3D NETMAP_RXRING(me->nifp, 0); > - return 0; > + > + return; > =20 > error: > close(me->fd); > - return -1; > + return; > } Dead return, if you wanted to remove it. Minor enough that I'm okay with it whether or not you make those changes:= Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UqI6mHtw4npeC6dfw2B7obdtSOtigGKhb 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/ iQEcBAEBCAAGBQJWPMjWAAoJEKeha0olJ0NqH4IIAK+svjjgO3f3c2XNNXunahH7 U9Ylfhm2Swv82Mylwdcd6TZCKvHaT0Qc9pqMpuKyvYnSN9eaw1oM2NikQkwpN12q mlxbiwwtC0BLUkfBQm4sO+STJQ4AUkq5XIwZFJsGR44/sbcur3UiG9eit9wOCZN8 8HtHIlSvo+mzxjqFBoBnctT3zGK8//J/K8B/8oN5l5z58OzkmBReRiFgW7W7GP1w 6Q+6LQt8x+gW5uk8IdEtcp+3LNwyCNnSMDfB5/kK78EVPxMiFlolNuAz/ejImSlp uCCt/QtKimxisDX8NRNK7zRowZBPCOI66VvfvMi7+5LmTiF4K9mQg661ZOuePmY= =fsbe -----END PGP SIGNATURE----- --UqI6mHtw4npeC6dfw2B7obdtSOtigGKhb--