[coreboot-gerrit] New patch to review for coreboot: coreinfo/cbfs: Don't assume that the free space is at the end
Jonathan Neuschäfer
gerrit at coreboot.org
Thu Mar 10 14:51:53 CET 2016
Jonathan Neuschäfer just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14024
-gerrit
commit 6d8f6d42856d47bb3942b910711f686c2544eb54
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date: Thu Mar 10 04:32:46 2016 +0100
coreinfo/cbfs: Don't assume that the free space is at the end
Change-Id: I21eb1dfbe52921843d28683c9396e9b27caa4fbf
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
payloads/coreinfo/cbfs_module.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c
index a5ddc53..1a59d01 100644
--- a/payloads/coreinfo/cbfs_module.c
+++ b/payloads/coreinfo/cbfs_module.c
@@ -134,10 +134,15 @@ static int cbfs_module_redraw(WINDOW * win)
wattrset(win, COLOR_PAIR(3) | A_BOLD);
else
wattrset(win, COLOR_PAIR(2));
- if (i == filecount - 1)
- mvwprintw(win, 2 + i, 1, "<free space>");
- else
+
+ if (strlen(filenames[i]) == 0) {
+ if (findfile(filenames[i])->type == COMPONENT_NULL)
+ mvwprintw(win, 2 + i, 1, "<free space>");
+ else
+ mvwprintw(win, 2 + i, 1, "<unnamed>");
+ } else {
mvwprintw(win, 2 + i, 1, "%.25s", filenames[i]);
+ }
}
f = findfile(filenames[selected]);
More information about the coreboot-gerrit
mailing list