From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D1Rxm-0007BG-0f for mharc-grub-devel@gnu.org; Wed, 16 Feb 2005 11:23:42 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D1Rxj-00079a-0j for grub-devel@gnu.org; Wed, 16 Feb 2005 11:23:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D1Rxd-00077F-S2 for grub-devel@gnu.org; Wed, 16 Feb 2005 11:23:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D1Rxd-00074K-JZ for grub-devel@gnu.org; Wed, 16 Feb 2005 11:23:33 -0500 Received: from [194.67.23.121] (helo=mx1.mail.ru) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D1RbJ-00045I-VO for grub-devel@gnu.org; Wed, 16 Feb 2005 11:00:30 -0500 Received: from [83.77.2.143] (port=1358 helo=[192.168.1.100]) by mx1.mail.ru with esmtp id 1D1RbI-0006w4-00 for grub-devel@gnu.org; Wed, 16 Feb 2005 19:00:28 +0300 Message-ID: <42136E4D.9090709@list.ru> Date: Wed, 16 Feb 2005 17:01:17 +0100 From: Serbinenko Vladimir User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 References: <200502142225.36773.okuji@enbug.org> <42125A96.2060402@yahoo.fr> <200502152323.09524.okuji@enbug.org> In-Reply-To: <200502152323.09524.okuji@enbug.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: Re: some design issues 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: Wed, 16 Feb 2005 16:23:40 -0000 Yoshinori K. Okuji wrote: >On Tuesday 15 February 2005 21:24, Vincent Pelletier wrote: > > >>Isn't it already present ? >> >> > >No. > > > >>There is a "nested" variable passed to menu main function, that >>should do the trick (leaving a menu which is nested would give back >>the control to the calling menu, which would redraw itself). >> >> > >It is a different thing. The question is, for example, how to add a new >menu entry into current menu. Suppose this command: > >entry "foo" { >} > >The command "entry" should be an ordinary command. I don't want to make >it special like "title" in GRUB Legacy. Then, this command must be able >to access a menu variable. So, one way is to define the function like >this: > >grub_err_t >grub_cmd_entry (struct grub_arg_list *state, int argc, char **args, >grub_context_t context) >{ > grub_menu_add_entry (context->menu, ...); > ... >} > >Another way is: > >grub_err_t >grub_cmd_entry (struct grub_arg_list *state, int argc, char **args) >{ > grub_context_t context = grub_get_context (); > > grub_menu_add_entry (context->menu, ...); > ... >} > > > In my scripting engine entry is parsed the same way that function. Only difference is where contents stored but it's not written as a normal function because it changes a bit the way the input parsed (no expanding, ...) What do you think about it? >Okuji > > > > >_______________________________________________ >Grub-devel mailing list >Grub-devel@gnu.org >http://lists.gnu.org/mailman/listinfo/grub-devel > > > >