From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yt1Bf-00018w-4T for qemu-devel@nongnu.org; Thu, 14 May 2015 18:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yt1Bb-0005lr-R8 for qemu-devel@nongnu.org; Thu, 14 May 2015 18:01:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yt1Bb-0005lV-J8 for qemu-devel@nongnu.org; Thu, 14 May 2015 18:00:59 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4EM0wT8000320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 14 May 2015 18:00:58 -0400 Message-ID: <55551B19.5020402@redhat.com> Date: Thu, 14 May 2015 16:00:57 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431432187-10993-1-git-send-email-armbru@redhat.com> <1431432187-10993-14-git-send-email-armbru@redhat.com> In-Reply-To: <1431432187-10993-14-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0SEUusFl80sGA31S1l72eaMp7B8b5xrea" Subject: Re: [Qemu-devel] [PATCH 13/15] tap-solaris: Convert tap_open() to Error 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) --0SEUusFl80sGA31S1l72eaMp7B8b5xrea Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/12/2015 06:03 AM, Markus Armbruster wrote: > Fixes inappropriate use of syslog(). >=20 > Not fixed: leaks on error paths, suspicious non-fatal errors. FIXMEs > added instead. At least you're admitting where the code is still bad. >=20 > Signed-off-by: Markus Armbruster > --- > net/tap-solaris.c | 59 ++++++++++++++++++++++++++++-------------------= -------- > 1 file changed, 30 insertions(+), 29 deletions(-) >=20 > @@ -99,20 +100,20 @@ static int tap_alloc(char *dev, size_t dev_size) > strioc_ppa.ic_len =3D sizeof(ppa); > strioc_ppa.ic_dp =3D (char *)&ppa; > if ((ppa =3D ioctl (tap_fd, I_STR, &strioc_ppa)) < 0) > - syslog (LOG_ERR, "Can't assign new interface"); > + error_report("Can't assign new interface"); I see you're fixing spacing while at it, as well. > =20 > TFR(if_fd =3D open("/dev/tap", O_RDWR, 0)); > if (if_fd < 0) { > - syslog(LOG_ERR, "Can't open /dev/tap (2)"); > - return -1; > + error_setg(errp, "Can't open /dev/tap (2)"); > + return -1; > } > if(ioctl(if_fd, I_PUSH, "ip") < 0){ > - syslog(LOG_ERR, "Can't push IP module"); Should you add the space after 'if' while touching this? > - return -1; > + error_setg(errp, "Can't push IP module"); > + return -1; > } > =20 > if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) < 0) > - syslog(LOG_ERR, "Can't get flags\n"); > + error_report("Can't get flags"); What about adding missing {} while touching this file? Hmm - there's enough cruft that it may involve a separate patch just to clean up style. For this patch, I'm not going to hold up review on style. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0SEUusFl80sGA31S1l72eaMp7B8b5xrea 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/ iQEcBAEBCAAGBQJVVRsZAAoJEKeha0olJ0Nqct8H+wd2kvI+OjJUFukiA64TKjOj Lk/yaWUVXjqotilXzyYpiIhLYzGm89HUPTkFbTqBJ2UK//eUW4HT8baJGhEbpuTu V5GqtCNONQadvmHunB8Q/nNoMm4XqReeX6d3A17zBs9OwGlHvG48fxFmu7Wpwge0 gZGqF7+NHjR7YwOXNnsGD8GLtLdr1hTSahtslu/vKdZFoD+ej0agfnl1bsQbezDo T/UorDlcVHxi17oNXarhKvZLas0qqQ8a7fAnxWpg6tba40apcCrCoVeZE6ftTBnM 6m5wGybKDlFgJBEk37oTvZxXWudm0JWWtCXHq6VeZPr8KAFY69LSQwAcsHuSkf0= =X+4L -----END PGP SIGNATURE----- --0SEUusFl80sGA31S1l72eaMp7B8b5xrea--