[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test -e patch
From: |
Marco Gerards |
Subject: |
Re: test -e patch |
Date: |
Mon, 04 Jun 2007 17:34:34 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
adrian15 <address@hidden> 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
- test -e patch, adrian15, 2007/06/01
- Re: test -e patch, adrian15, 2007/06/03
- Re: test -e patch, adrian15, 2007/06/03
- Re: test -e patch, adrian15, 2007/06/03
- Re: test -e patch,
Marco Gerards <=
- Re: test -e patch, adrian15, 2007/06/05
- Re: test -e patch, adrian15, 2007/06/06