From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1E4Eur-0005rw-9z for mharc-grub-devel@gnu.org; Sun, 14 Aug 2005 05:36:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E4Eug-0005fs-OZ for grub-devel@gnu.org; Sun, 14 Aug 2005 05:36:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E4EuB-0005Cw-8j for grub-devel@gnu.org; Sun, 14 Aug 2005 05:35:50 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E4EtR-0003Wg-9u for grub-devel@gnu.org; Sun, 14 Aug 2005 05:35:02 -0400 Received: from [64.233.170.205] (helo=rproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E4EsC-0003KA-IA for grub-devel@gnu.org; Sun, 14 Aug 2005 05:33:44 -0400 Received: by rproxy.gmail.com with SMTP id y7so665362rne for ; Sun, 14 Aug 2005 02:18:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:disposition-notification-to:date:from:user-agent:x-accept-language:mime-version:to:subject:content-type:content-transfer-encoding; b=DXAe/tixHgXvqejUNnT7XWO4m7tZltx8mQKflnIol7FAP3sSPhmAfqJZkXTq9K5Qmm2Ni8oN9DHlSOCGIC5iAKTLFA20iE32mQj3gQtwNU4/4+sJ0uBWDMiCSVuFK/ZghMU2Mzq9XV1FCGIue6IYYeCHVKuhPFi7qbdzMqR1Xxk= Received: by 10.39.2.8 with SMTP id e8mr1624854rni; Sun, 14 Aug 2005 02:18:13 -0700 (PDT) Received: from ?192.168.1.100? ([83.76.3.140]) by mx.gmail.com with ESMTP id j20sm953849rnf.2005.08.14.02.18.12; Sun, 14 Aug 2005 02:18:13 -0700 (PDT) Message-ID: <42FF0C53.1070601@gmail.com> Date: Sun, 14 Aug 2005 11:18:11 +0200 From: Vladimir Serbinenko User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Subject: [DISCUSSION] Scripts and menus 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: Sun, 14 Aug 2005 09:36:25 -0000 IMHO. Current system with title command is ugly because: -grub.cfg requires the separate parser. IMHO it should be parsed the same way as user input. -Even when scripting support will be ready it's impossible to create multiple menus of the same kind by just a loop (like for x in /boot/vmlinuz-*; do menuitem name="linux-$x" title="Linux with kernel $x" linux $x [....] endmenuitem; done; ) - if in future menu entrys will have more parameters (e.g: name, keyboard shortcut) how could we specify them? As arisen in discussion about serial console multiple menus could be useful. I propose to split munu.c in general (e.g: run_entry) and menu-specific (like run_menu) and then make multiple menu support like done with terminals. Then we could add other menus: like lilo menu (additional parameters could be stored in variable: then boot function could also look at this variable for parameters (of course parameters from unauthorized users will be ignored)), vesa menu (and 3rd party programmers could write vesa menus then it would be like skin support), x-menu over ssh/network, ... IMHO grub2 needs scripting support to be more powerful I propose to use bison translating commands in the structures like: struct command { enum type {SCRIPT_CMD_NORMAL, SCRIPT_CMD_IF, [...]}; /* type of command*/ enum link {SCRIPT_LINK_NORMAL, SCRIPT_LINK_AND, [...]}; /* Was there a &&, ||, ... before command?*/ union { char *command; struct command *if_jump; /* Bison could translate the condition as preceding command*/ [...] } }; then menu-entrys could be menuentry name= title= [key-shortcut=<..>] [picture=<...>] <....> endmenuentry I'm ready to make the work of menu-splitting, lilo-menu and scripting What do you think about it? Vladimir