From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SohjI-0008NG-Ha for qemu-devel@nongnu.org; Tue, 10 Jul 2012 17:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SohjG-0005IC-SY for qemu-devel@nongnu.org; Tue, 10 Jul 2012 17:12:20 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:56954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SohjG-0005I2-ME for qemu-devel@nongnu.org; Tue, 10 Jul 2012 17:12:18 -0400 Message-ID: <4FFC9AAE.50609@weilnetz.de> Date: Tue, 10 Jul 2012 23:12:14 +0200 From: Stefan Weil MIME-Version: 1.0 References: <4FFC9643.7020509@codemonkey.ws> In-Reply-To: <4FFC9643.7020509@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] Avoid unportable %m format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Blue Swirl , qemu-devel@nongnu.org Am 10.07.2012 22:53, schrieb Anthony Liguori: > On 07/08/2012 06:51 AM, blauwirbel@gmail.com wrote: >> From: Blue Swirl >> >> Replace %m format with explicit call to standard strerror(). >> >> Signed-off-by: Blue Swirl > > I would expect '%m' to be thread safe whereas strerror() isn't. I > don't think this change is actually good. > > You'd need to do something more clever with strerror_r() to be > equivalent. > > Regards, > > Anthony Liguori > Extract from the Linux manpage PRINTF(3): m (Glibc extension.) Print output of strerror(errno). No argument is required. The patch should result in identical behaviour with Glibc. It improves the situation for all platforms which don't use Glibc. In theory, strerror_r() might be more correct, but in the typical practical scenarios (error output before abort) it is not really needed. Regards, Stefan Weil