[PATCH 2/3] commands: boot: display each list entry in a separate line

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Nov 23 11:14:31 EST 2020


The boot entry lines could get quite long for bootspec entries and then
follow-up commit will make them even longer, thus split the lines into
two lines and indent the second.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/boot.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/boot.c b/common/boot.c
index 76d03c26c4f4..6e41849ee043 100644
--- a/common/boot.c
+++ b/common/boot.c
@@ -390,11 +390,10 @@ void bootsources_list(struct bootentries *bootentries)
 {
 	struct bootentry *entry;
 
-	printf("%-20s\n", "title");
-	printf("%-20s\n", "------");
+	printf("title\n------\n");
 
 	bootentries_for_each_entry(bootentries, entry)
-		printf("%-20s %s\n", entry->title, entry->description);
+		printf("%s\n\t%s\n", entry->title, entry->description);
 }
 
 BAREBOX_MAGICVAR(global.boot.default, "default boot order");
-- 
2.29.2




More information about the barebox mailing list