From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH 3/4] Change grub_file_seek() to return grub_err_t
Date: Thu, 23 Jul 2009 15:14:28 -0400 [thread overview]
Message-ID: <1248376468.2661.25.camel@mj> (raw)
In-Reply-To: <d7ead6de0907230123x7d5948c1kb9f1429b4c617e9@mail.gmail.com>
On Thu, 2009-07-23 at 10:23 +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Wed, Jul 22, 2009 at 5:16 AM, Pavel Roskin<proski@gnu.org> 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
next prev parent reply other threads:[~2009-07-23 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 3:16 [PATCH 1/4] Handle errors in rmmod Pavel Roskin
2009-07-22 3:16 ` [PATCH 2/4] Fix insmod not to increase refcount above 1 Pavel Roskin
2009-07-22 3:16 ` [PATCH 3/4] Change grub_file_seek() to return grub_err_t Pavel Roskin
2009-07-23 8:23 ` Vladimir 'phcoder' Serbinenko
2009-07-23 19:14 ` Pavel Roskin [this message]
2009-07-22 3:16 ` [PATCH 4/4] Fix ALIGN_UP cutting upper bits Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248376468.2661.25.camel@mj \
--to=proski@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.