Hello, OKUJI!
> Please tell me what is wrong about the config_file definition. I
> don't see that's bad.
When you write
char* config_file;
it means that the variable config_file occupies 4 bytes, and holds a
pointer to a string. When you write
VARIABLE(config_file)
it means, that those 4 bytes, and not the string where they point to, are
stored in 4 bytes beginning at the address of VARIABLE(config_file)
When you write
char config_file[];
it means that the variable config_file is not actually a variable. It is a
short notation of &(config_file[0]) in C programs. This is a
pointer, which is stored nowhere, and this is an array of chars,
whose size is not specified. The compiler substitutes config_file
at the compile time. Thus, in assembler programs, when you write
VARIABLE(config_file)
it means that the variable config_file used in C programs points to the
byte following this declaration.
Shortly, "char config_file[]" and "char* config_file" are almost the same
as long as you don't specify in pure assembler, where they are stored.
When you declare "char* config_file", you instruct the compiler to use a
variable situated at VARIABLE(config_file), instead of substituting
config_file with the pointer to the data.
Disclaimer: I'm not a C guru. My explanation may be inexact, but the
fact is, that GRUB shows the menu after my patch.
Pavel Roskin