adrian15 <[EMAIL PROTECTED]> writes:

>>> GRUB_MOD_INIT(test)
>>> {
>>>   (void)mod;                        /* To stop warning. */
>>>   grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>>>                      "[ EXPRESSION ]", "Evaluate an expression", 0);
>>>   grub_register_command ("test", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>>>                      "test EXPRESSION", "Evaluate an expression", 0);
>>> }
>>
>> I understand this register commands. I suppose this information is read
>> from the help command or it isn't ?
>>
>> Or maybe it also reads from:
>> static const struct grub_arg_option options ?
>
> I've found it.
>
> It reads from the register command and ALSO from options IF you tell it
> to do so with:
>
>   (void)mod;                  /* To stop warning. */
>   grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>                        "[ EXPRESSION ]", "Evaluate an expression", options);
>   grub_register_command ("test", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>                        "test EXPRESSION", "Evaluate an expression", options);

If you don't pass the options to this functions, the options won't be
parsed.  One fun thing you can try: options can be tab-completed in
GRUB 2 :-)

--
Marco



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to