From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS7VC-0002Dm-7d for qemu-devel@nongnu.org; Tue, 26 Jul 2016 14:54:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bS7V6-0003zz-CZ for qemu-devel@nongnu.org; Tue, 26 Jul 2016 14:54:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS7V6-0003zr-3x for qemu-devel@nongnu.org; Tue, 26 Jul 2016 14:54:44 -0400 References: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> From: Eric Blake Message-ID: <5797B1F1.2010006@redhat.com> Date: Tue, 26 Jul 2016 12:54:41 -0600 MIME-Version: 1.0 In-Reply-To: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IdXQ10EcUxQL778fmqGTUrrOfShu4u6pC" Subject: Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sascha Silbe , qemu-devel@nongnu.org Cc: Kevin Wolf , Halil Pasic , Michael Roth , Markus Armbruster , Cornelia Huck , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IdXQ10EcUxQL778fmqGTUrrOfShu4u6pC From: Eric Blake To: Sascha Silbe , qemu-devel@nongnu.org Cc: Kevin Wolf , Halil Pasic , Michael Roth , Markus Armbruster , Cornelia Huck , Max Reitz Message-ID: <5797B1F1.2010006@redhat.com> Subject: Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered References: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> In-Reply-To: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/26/2016 12:44 PM, Sascha Silbe wrote: > As a general policy, we want callers to save errno > themselves. error_setg_internal() currently goes out of its way to > preserve errno, so with the API documentation not mentioning it either > way, callers might come to rely on the current behaviour of the > implementation. Spell out that we don't want to make that promise. Alternatively, we could explicitly document that we DO intend to preserve errno, so that callers can rely on it. Libvirt went with that approach (error-reporting functions that preserve errno are easier to think about than functions which may clobber errno). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IdXQ10EcUxQL778fmqGTUrrOfShu4u6pC 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/ iQEcBAEBCAAGBQJXl7HxAAoJEKeha0olJ0Nqc1IH/idfT4Vm3dtLGhza0ixIDJK7 cOBMVqjut5C5dJSW16FH9NW5aQHtfruR3Cs5Y28Vpejma4Ut5Z8zlvYNbC09qZXH 0UCeX7xTM94oI5R9RIKllvZT2zhu5jVwqMUuDr+c3pRgESlkuqrw9KjdDEVhBVlZ +ZdrmX1PGvkXlrePpRO0eDgxNuIYrLe+Lz9o7tu0crZb12P0f+n6jG4MQrCjpGDS uqqz4eKKdbDkY9t+JXmPoDTKpxQIcJuW16gdF9C8EaDbkxrKAjax4r39i2VSeFb1 XraLnvh8RsyylV27VpU5c2iWe5SRLsEYyiRfb6iamxcOQrz4afavbwSOh1R6zC0= =jzfc -----END PGP SIGNATURE----- --IdXQ10EcUxQL778fmqGTUrrOfShu4u6pC--