Bean <[EMAIL PROTECTED]> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel