Received: from eggs.gnu.org ([2001:4830:134:3::10]:40865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSL7N-0001nq-LF for qemu-devel@nongnu.org; Wed, 27 Jul 2016 05:27:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSL7K-0001Dp-Gy for qemu-devel@nongnu.org; Wed, 27 Jul 2016 05:27:09 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:46963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSL7K-0001DQ-6z for qemu-devel@nongnu.org; Wed, 27 Jul 2016 05:27:06 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6R9KJkr064392 for ; Wed, 27 Jul 2016 05:27:05 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 24dvp8a0sp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 27 Jul 2016 05:27:04 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Jul 2016 10:27:02 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3748917D805F for ; Wed, 27 Jul 2016 10:28:32 +0100 (BST) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u6R9QxUO7340092 for ; Wed, 27 Jul 2016 09:26:59 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u6R9QwTG001705 for ; Wed, 27 Jul 2016 03:26:58 -0600 From: Sascha Silbe In-Reply-To: <87lh0nwlsx.fsf@dusky.pond.sub.org> References: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> <87lh0nwlsx.fsf@dusky.pond.sub.org> Date: Wed, 27 Jul 2016 11:26:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <8760rre8im.fsf@oc4731375738.ibm.com> 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: Markus Armbruster Cc: Kevin Wolf , Halil Pasic , Michael Roth , qemu-devel@nongnu.org, Max Reitz , Cornelia Huck Dear Markus, Markus Armbruster writes: > Sascha Silbe writes: > >> As a general policy, we want callers to save errno >> themselves. error_setg_internal() currently goes out of its way to >> preserve errno, > > In other words, "error_setg_errno(): errno may be clobbered" is a lie :) No, it's just standardese (though it should be in capital letters for that) for "do not rely on it, we may change our mind any time". :) >> so with the API documentation not mentioning it either >> way, callers might come to rely on the current behaviour of the >> implementation. > > According to Max, we rely on the errno-saving behavior in several places > already, and don't intend to change them. > >> Spell out that we don't want to make that promise. > > Well, we already did, tacitly. Let's make the promise explicit. Could > you post the patch? Sure [1]. Like a good lawyer, I can argue either way, even within the same case. ;) Sascha [1] mid:1469611466-31574-1-git-send-email-silbe@linux.vnet.ibm.com "[PATCH] error: error_setg_errno(): errno gets preserved" by Sascha Silbe , sent on 2016-07-27. --=20 Softwareentwicklung Sascha Silbe, Niederhofenstra=C3=9Fe 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641