grub-devel
[Top][All Lists]
Advanced

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

Re: Problem with the blocklist command


From: Marco Gerards
Subject: Re: Problem with the blocklist command
Date: Tue, 31 Jul 2007 12:55:05 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Bean <address@hidden> writes:

Hi Bean,

> I notice that the output of blocklist command is quite strange. After
> some debuging, I think
> the problem may be caused by the compiler.

[...]

> I blocklist a very small file, it shows
> 1- 32
> 2- 32
> 3- 17294103305076670291
>
> If I define part_start as a global variable, the ouput is ok.
>
> I don't know if this is a compiler related bug, my gcc version is
>
> gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)

This is most likely the regparam bug.  I wrote a macro to work around
this bug (NESTED_FUNC_ATTR).  See, for example, how this is used in
fshelp.[ch].  Most likely the same has to be done for the read_hook.
When you do this, the problem will disappear.  I could fix this for
you, if you do not exactly understand what I mean...

We should at some point check if other hooks have the same problem.

> btw, I'm curious to know how local variable part_start is passed to
> hook function
> read_blocklist.

It isn't.  The hook function is a nested function, it can access all
local variables of grub_cmd_blocklist.

--
Marco





reply via email to

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