From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 3 Jun 2012 12:27:39 +0200 Subject: [U-Boot] [PATCH 1/2] menu: Added support to use user defined functions In-Reply-To: <15235792.3zc5azm5Nt@pali> References: <1338136729-3907-1-git-send-email-pali.rohar@gmail.com> <201206031159.16888.marex@denx.de> <15235792.3zc5azm5Nt@pali> Message-ID: <201206031227.39959.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Pali Roh?r, > On Sunday 03 June 2012 11:59:16 Marek Vasut wrote: > > > --- a/include/menu.h > > > +++ b/include/menu.h > > > @@ -21,12 +21,14 @@ > > > > > > struct menu; > > > > > > struct menu *menu_create(char *title, int timeout, int > > > prompt, > > > > > > - void (*item_data_print)(void *)); > > > + void (*item_data_print)(void *), > > > + char *(*item_data_choice)(void *), > > > > Where is this item_data_choice() used? > > This is alternative function for menu entry choice. It is used in > function menu_interactive_choice. If item_data_choice is NULL > default code with readline_into_buffer is used. > > ANSI bootmenu command (in next patch) is using its own function. Hm so why not make this ANSI stuff one plugin and the other bootmenu stuff another plugin (which will be default). Then you won't have to check if anything is null. Best regards, Marek Vasut