From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNamY-0004Kn-Hf for qemu-devel@nongnu.org; Thu, 15 Jan 2009 17:33:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNamX-0004K7-06 for qemu-devel@nongnu.org; Thu, 15 Jan 2009 17:33:46 -0500 Received: from [199.232.76.173] (port=45238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNamW-0004Jx-R1 for qemu-devel@nongnu.org; Thu, 15 Jan 2009 17:33:44 -0500 Received: from smtp4-g21.free.fr ([212.27.42.4]:36468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNamV-0006P0-JX for qemu-devel@nongnu.org; Thu, 15 Jan 2009 17:33:44 -0500 Received: from smtp4-g21.free.fr (localhost [127.0.0.1]) by smtp4-g21.free.fr (Postfix) with ESMTP id B2F3B4C805B for ; Thu, 15 Jan 2009 23:33:37 +0100 (CET) Received: from laptop (vaf26-2-82-244-111-82.fbx.proxad.net [82.244.111.82]) by smtp4-g21.free.fr (Postfix) with ESMTP id 6445A4C80CC for ; Thu, 15 Jan 2009 23:33:34 +0100 (CET) In-Reply-To: <20090115.151537.-887879155.imp@bsdimp.com> Subject: Re: [Qemu-devel] [6324] Return -errno on write failure (Gleb Natapov) From: "=?utf-8?q?Fran=C3=A7ois?= Revol" Date: Thu, 15 Jan 2009 23:33:57 +0100 CET Message-Id: <7262523430-BeMail@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > In message: <2858981241-BeMail@laptop> > "Fran=C3=A7ois Revol" writes: > : > Revision: 6324 > : > http://svn.sv.gnu.org/viewvc/=3Fview=3Drev&root=3Dqemu&revision=3D6324 > > : > > Author: aliguori > : > Date: 2009-01-15 20:44:26 +0000 (Thu, 15 Jan 2009) > : > > : > Log Message: > : > ----------- > : > Return -errno on write failure (Gleb Natapov) > : > : Nooooooooooo > : Please do not this bad broken Unix habit! > > s/Unix/Linux/ I didn't want to sound inquisitory, but indeed most uses I've seen come from Linux code or linux devs, though OSSv4 had it quite everywhere. It's actually fairly common inside Unix kernels themselves. There it's absolutely no problem since it's by definition code that only targets a single OS. But I've seen more and more userland (and portable kernel) code using this bad trick without consideration for other platforms. The fact that it's "standardized" doesn't make it better for real world implementations that do depart from the standard. And Opengroup screwing up didn't help: http://www.opengroup.org/onlinepubs/000095399/basedefs/errno.h.html#tag=5F13=5F10=5F10 I'll try to make a patch to correct this. Fran=C3=A7ois.