Received: from eggs.gnu.org ([2001:4830:134:3::10]:53363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSJni-0006Hy-2e for qemu-devel@nongnu.org; Wed, 27 Jul 2016 04:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSJnd-0005BO-A6 for qemu-devel@nongnu.org; Wed, 27 Jul 2016 04:02:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSJnd-0005BI-4h for qemu-devel@nongnu.org; Wed, 27 Jul 2016 04:02:41 -0400 From: Markus Armbruster References: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> Date: Wed, 27 Jul 2016 10:02:38 +0200 In-Reply-To: <1469558699-23314-1-git-send-email-silbe@linux.vnet.ibm.com> (Sascha Silbe's message of "Tue, 26 Jul 2016 20:44:59 +0200") Message-ID: <87lh0nwlsx.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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 Cc: qemu-devel@nongnu.org, Kevin Wolf , Halil Pasic , Michael Roth , Cornelia Huck , Max Reitz 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 :) > 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? > Signed-off-by: Sascha Silbe