[coreboot-gerrit] New patch to review for coreboot: coreinfo: Show "No modules selected" when appropriate

Jonathan Neuschäfer gerrit at coreboot.org
Thu Mar 10 14:51:55 CET 2016


Jonathan Neuschäfer just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14025

-gerrit

commit 0ede6aed9189f7859fb35dc511d364cab1321ed5
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date:   Thu Mar 10 04:56:31 2016 +0100

    coreinfo: Show "No modules selected" when appropriate
    
    Change-Id: I7222544757587b37e0cf632aa01d042414dde223
    Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
 payloads/coreinfo/coreinfo.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c
index 41b5f12..82a57da 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();



More information about the coreboot-gerrit mailing list