diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2016-03-10 04:56:31 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-03-11 18:42:00 +0100 |
commit | 8a61a2f2d567b7858794e3ec8cfc63bee6e07335 (patch) | |
tree | ae444a8f7bed3efacc7ffd75d5f2d255e48a6d0c /payloads | |
parent | 1aca8b898da359fbde2976ba0d031de8be6e857c (diff) | |
download | coreboot-8a61a2f2d567b7858794e3ec8cfc63bee6e07335.tar.xz |
coreinfo: Show "No modules selected" when appropriate
Change-Id: I7222544757587b37e0cf632aa01d042414dde223
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/14025
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'payloads')
-rw-r--r-- | payloads/coreinfo/coreinfo.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c index 41b5f12cb1..82a57dab19 100644 --- a/payloads/coreinfo/coreinfo.c +++ b/payloads/coreinfo/coreinfo.c @@ -213,11 +213,24 @@ static void handle_category_key(struct coreinfo_cat *cat, int key) } } +static void print_no_modules_selected(void) +{ + int height = getmaxy(stdscr), i; + + for (i = 0; i < ARRAY_SIZE(categories); i++) + if (categories[i].count > 0) + return; + + color_set(2, NULL); // White on black + center(height / 2, "No modules selected"); +} + static void loop(void) { int key; center(0, CONFIG_PAYLOAD_INFO_NAME " " CONFIG_PAYLOAD_INFO_VERSION); + print_no_modules_selected(); refresh(); print_menu(); |