grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t


From: Pavel Roskin
Subject: Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t
Date: Thu, 23 Jul 2009 15:14:28 -0400

On Thu, 2009-07-23 at 10:23 +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Wed, Jul 22, 2009 at 5:16 AM, Pavel Roskin<address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]