From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4sTT-00032K-GC for qemu-devel@nongnu.org; Tue, 16 Jun 2015 11:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4sTS-0003th-Hz for qemu-devel@nongnu.org; Tue, 16 Jun 2015 11:08:27 -0400 Message-ID: <55803BE0.7000206@redhat.com> Date: Tue, 16 Jun 2015 09:08:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1434458200-23440-1-git-send-email-mst@redhat.com> <1434458200-23440-4-git-send-email-mst@redhat.com> In-Reply-To: <1434458200-23440-4-git-send-email-mst@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ownQ9BJwIKuWM9ECnUDUgNuCdMaESJcue" Subject: Re: [Qemu-devel] [PATCH RFC 3/3] block/nfs: switch to error_init_local List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, Jeff Cody , Peter Lieven , armbru@redhat.com, dgilbert@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ownQ9BJwIKuWM9ECnUDUgNuCdMaESJcue Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/16/2015 06:53 AM, Michael S. Tsirkin wrote: > We probably should just switch everyone, this is > just to demonstrate the API usage. >=20 > Signed-off-by: Michael S. Tsirkin > --- > block/nfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) And indeed this is the reason things are still at RFC level. I like the idea. It doesn't change anything for a bug-free program, but where we DO have a bug, we now get a stacktrace that aborts as soon as possible rather than delaying to the propagation point and losing some information= =2E >=20 > diff --git a/block/nfs.c b/block/nfs.c > index ca9e24e..de4b8c3 100644 > --- a/block/nfs.c > +++ b/block/nfs.c > @@ -385,7 +385,7 @@ static int nfs_file_open(BlockDriverState *bs, QDic= t *options, int flags, > NFSClient *client =3D bs->opaque; > int64_t ret; > QemuOpts *opts; > - Error *local_err =3D NULL; > + Error *local_err =3D error_init_local(errp); Should be a fairly mechanical patch to catch all the spots; although there are multiple spellings (not all callers name it local_err). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ownQ9BJwIKuWM9ECnUDUgNuCdMaESJcue 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/ iQEcBAEBCAAGBQJVgDvgAAoJEKeha0olJ0NqfyYH/0/260s11bWm+qX7CdQBEVyM Er1L+2WjjkGyBZY8Jd88pGUG9JBN8tk15I1+BdXBLeywnHjBH7IKt9rB23C4aGfZ +zRVTuBSlZlf5N8FyBHj62bMDPNH3rbqFuXHWqBUwXZlio5qvwzl7NFdjDChPpUv pU+4mkiKroam/ACROkF17m8xM6A3q6PK9IFVQ3od49yWpal7MlJ+vJJ2sePoZl5Z QNxGQrfS0hYFRytBh/oh+48RiDvgQ0jbASIt5Epwe3ibcbC+5IUTLP2/Bi33F8XL OBHHWXGT8l4yFmdNdBcl/zQp+Q/b+o/NMS6ZINEILtu5JfzvpkJ15w5fHm7VTyc= =dtD4 -----END PGP SIGNATURE----- --ownQ9BJwIKuWM9ECnUDUgNuCdMaESJcue--