grub-devel
[Top][All Lists]
Advanced

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

Re: New commands (reboot, halt, help)


From: Marco Gerards
Subject: Re: New commands (reboot, halt, help)
Date: Sat, 29 Jan 2005 16:17:19 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Serbinenko Vladimir <address@hidden> writes:

>>Right.  What the code does is making sure GRUB_COMMAND_FLAG_CMDLINE
>>and GRUB_COMMAND_FLAG_MENU commands and commands with both set are
>>shown.  I fail to see the redundancy.
>>
>>
>>
> In normal.h:
> /* Can be run in the command-line.  */
> #define GRUB_COMMAND_FLAG_CMDLINE    0x1
> /* Can be run in the menu.  */
> #define GRUB_COMMAND_FLAG_MENU        0x2
> /* Can be run in both interfaces.  */
> #define GRUB_COMMAND_FLAG_BOTH        0x3
> so GRUB_COMMAND_FLAG_BOTH is 11 in binary, so x&GRUB_COMMAND_FLAG_BOTH
> will not be zero if and only if bit 0 *or* bit 1 is set
> Example
> GRUB_COMMAND_FLAG_CMDLINE &GRUB_COMMAND_FLAG_BOTH=1
> GRUB_COMMAND_FLAG_MENU&GRUB_COMMAND_FLAG_BOTH=2
> GRUB_COMMAND_FLAG_BOTH&GRUB_COMMAND_FLAG_BOTH=3
> *GRUB_COMMAND_FLAG_BOTH&GRUB_COMMAND_FLAG_CMDLINE=1*
> The last example shows that for command with attribute
> GRUB_COMMAND_FLAG_BOTH already
>
> cmd->flags & GRUB_COMMAND_FLAG_CMDLINE will be true

Right I know that and what you described was exactly my intention.  I
wanted it to be true for all these 3 cases.  As you can see
GRUB_COMMAND_FLAG_TITLE is set to 4.  And these commands will not be
shown and that was also my intention.

So I am under the impression that my code is right.  However, perhaps
you don't think it is clean, in that case you could say what would be
better.

Or if you don't agree with how it works, only showing the commands
used in the menu and the command line while not showing title, we can
talk about that.

I hope I was clearer now.  Sometimes English makes the communication
about such things a bit difficult for me.

Thanks,
Marco






reply via email to

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