All of lore.kernel.org
 help / color / mirror / Atom feed
From: Serbinenko Vladimir <serbinenko.vova@list.ru>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: some design issues
Date: Wed, 16 Feb 2005 17:01:17 +0100	[thread overview]
Message-ID: <42136E4D.9090709@list.ru> (raw)
In-Reply-To: <200502152323.09524.okuji@enbug.org>

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
>
>
>  
>




  reply	other threads:[~2005-02-16 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-14 21:25 some design issues Yoshinori K. Okuji
2005-02-15  6:14 ` Paul
2005-02-15 16:24 ` Hollis Blanchard
2005-02-15 22:15   ` Yoshinori K. Okuji
2005-02-15 19:41 ` Marco Gerards
2005-02-15 22:17   ` Yoshinori K. Okuji
2005-02-16 18:05     ` Marco Gerards
2005-02-16 20:49       ` Yoshinori K. Okuji
2005-02-15 20:24 ` Vincent Pelletier
2005-02-15 22:23   ` Yoshinori K. Okuji
2005-02-16 16:01     ` Serbinenko Vladimir [this message]
2005-02-16 21:07       ` Yoshinori K. Okuji
2005-02-17 16:03         ` Serbinenko Vladimir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42136E4D.9090709@list.ru \
    --to=serbinenko.vova@list.ru \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.