Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1CuvbC-0002Lj-2A for mharc-grub-devel@gnu.org; Sat, 29 Jan 2005 11:37:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cuvb9-0002Iv-F6 for grub-devel@gnu.org; Sat, 29 Jan 2005 11:37:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cuvb7-0002Ht-J0 for grub-devel@gnu.org; Sat, 29 Jan 2005 11:37:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cuvb7-0002Gb-1D for grub-devel@gnu.org; Sat, 29 Jan 2005 11:37:21 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CuvNJ-00064S-Gt for grub-devel@gnu.org; Sat, 29 Jan 2005 11:23:05 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 478FF9CD4 for ; Sat, 29 Jan 2005 17:17:26 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 27944-08 for ; Sat, 29 Jan 2005 17:17:25 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 8EA239C35 for ; Sat, 29 Jan 2005 17:17:25 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 4D21DC04A for ; Sat, 29 Jan 2005 17:17:25 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <87mzut3f3c.fsf@marco.marco-g.com> <200501290223.09666.okuji@enbug.org> <87ekg4s823.fsf@marco.marco-g.com> <200501291530.37761.okuji@enbug.org> <87acqss22c.fsf@marco.marco-g.com> <41FBAC5B.3030003@list.ru> From: Marco Gerards Date: Sat, 29 Jan 2005 16:17:19 +0000 In-Reply-To: <41FBAC5B.3030003@list.ru> (Serbinenko Vladimir's message of "Sat, 29 Jan 2005 16:31:39 +0100") Message-ID: <87wttwqkfk.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: New commands (reboot, halt, help) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 16:37:24 -0000 Serbinenko Vladimir 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