From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MU3kW-0000eM-Eu for mharc-grub-devel@gnu.org; Thu, 23 Jul 2009 15:14:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU3kU-0000dE-Kf for grub-devel@gnu.org; Thu, 23 Jul 2009 15:14:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU3kP-0000bM-Q8 for grub-devel@gnu.org; Thu, 23 Jul 2009 15:14:37 -0400 Received: from [199.232.76.173] (port=36207 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU3kP-0000bB-Ix for grub-devel@gnu.org; Thu, 23 Jul 2009 15:14:33 -0400 Received: from c60.cesmail.net ([216.154.195.49]:46342) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MU3kO-0004bR-Uo for grub-devel@gnu.org; Thu, 23 Jul 2009 15:14:33 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 23 Jul 2009 15:14:30 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 0C56434C6A for ; Thu, 23 Jul 2009 15:25:12 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: References: <20090722031638.6348.79007.stgit@mj.roinet.com> <20090722031653.6348.21972.stgit@mj.roinet.com> Content-Type: text/plain Date: Thu, 23 Jul 2009 15:14:28 -0400 Message-Id: <1248376468.2661.25.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 19:14:39 -0000 On Thu, 2009-07-23 at 10:23 +0200, Vladimir 'phcoder' Serbinenko wrote: > On Wed, Jul 22, 2009 at 5:16 AM, Pavel Roskin wrote: > > No callers need the previous offset. Returning -1 with implicit cast to > > grub_off_t required a cast just to check for errors. This also makes > > grub_file_seek() more similar to fseek(). > > > > ChangeLog: > > > > * kern/file.c (grub_file_seek): Return grub_err_t. Adjust all > > callers that check the return value. > Good idea but you forgot to update the following entry: > ./script/lua/grub_lib.c:270: offset = grub_file_seek (file, offset); Nice catch, thank you! And by the way, it's a reminder for all of us how massive changes can introduce subtle errors. It means that the lua interface was actually the only user on the old API. Changing it would change the user interface in the lua implementation. The standard lua seek is completely different: http://www.lua.org/manual/5.1/manual.html#pdf-file:seek I guess we are not trying to emulate that behavior. osdetect.lua doesn't use grub.file_seek(). So let's patch lua first, and then this patch can be applied. The lua patch will be sent separately. -- Regards, Pavel Roskin