From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvqjH-0003c8-PY for qemu-devel@nongnu.org; Thu, 17 Jan 2013 09:46:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvqjB-0004lN-PF for qemu-devel@nongnu.org; Thu, 17 Jan 2013 09:46:07 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:44606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvn2e-0003S9-Ll for qemu-devel@nongnu.org; Thu, 17 Jan 2013 05:49:52 -0500 Message-ID: <50F7D74E.6090006@msgid.tls.msk.ru> Date: Thu, 17 Jan 2013 14:49:50 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <20110606083658.C3A1B527A@gandalf.tls.msk.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] v6 revamp acpitable parsing and allow to specify complete (headerful) table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TeLeMan Cc: Blue Swirl , Isaku Yamahata , qemu-devel Wow you're replying to an old post... ;) 17.01.2013 13:50, TeLeMan wrote: > On Thu, May 12, 2011 at 10:44 PM, Michael Tokarev wrote: >> This patch almost rewrites acpi_table_add() function [] >> + >> + /* now read in the data files, reallocating buffer as needed */ >> + >> + for (f = strtok(buf, ":"); f; f = strtok(NULL, ":")) { >> + int fd = open(f, O_RDONLY); > > The acpi table is the binary file, so it should be opened by O_RDONLY > | O_BINARY. On Unix, O_BINARY is defined as 0, it has no effect whatsoever. But yes it is a bug on other platforms. I'll fix that in a moment. Thanks, /mnt