From: Heiko Schocher Date: Sun, 15 Jan 2012 08:53:41 +0100 Subject: [U-Boot] [PATCH 2/3] common, menu: add statusline support In-Reply-To: <1326614022-24014-1-git-send-email-hs@denx.de> References: <1326614022-24014-1-git-send-email-hs@denx.de> Message-ID: <1326614022-24014-3-git-send-email-hs@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 add the possibility to show a statusline when printing a menu Signed-off-by: Heiko Schocher Cc: Jason Hobbs --- common/menu.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/common/menu.c b/common/menu.c index 3b1e0d0..754a9f9 100644 --- a/common/menu.c +++ b/common/menu.c @@ -113,6 +113,13 @@ static inline void *menu_item_destroy(struct menu *m, return NULL; } +void __menu_display_statusline(struct menu *m) +{ + return; +} +void menu_display_statusline(struct menu *m) + __attribute__ ((weak, alias("__menu_display_statusline"))); + /* * Display a menu so the user can make a choice of an item. First display its * title, if any, and then each item in the menu. @@ -123,6 +130,7 @@ static inline void menu_display(struct menu *m) puts(m->title); putc('\n'); } + menu_display_statusline(m); menu_items_iter(m, menu_item_print, NULL); } -- 1.7.7.4