[PATCH 08/11] boot: Print boot entries in the order they are

Sascha Hauer s.hauer at pengutronix.de
Mon Nov 4 09:04:27 EST 2013


Instead of first printing the traditional entries and the bootloader
spec entries afterwards.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/boot.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/commands/boot.c b/commands/boot.c
index f2d9836..2162365 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -132,25 +132,15 @@ static void bootsources_list(void)
 
 	blspec = bootentries_collect();
 
-	printf("\nBootscripts:\n\n");
-	printf("%-40s   %-20s\n", "name", "title");
-	printf("%-40s   %-20s\n", "----", "-----");
+	printf("%-20s %-20s  %s\n", "device", "hwdevice", "title");
+	printf("%-20s %-20s  %s\n", "------", "--------", "-----");
 
 	blspec_for_each_entry(blspec, entry) {
 		if (entry->scriptpath)
 			printf("%-40s   %s\n", basename(entry->scriptpath), entry->me.display);
-	}
-
-	if (!IS_ENABLED(CONFIG_BLSPEC))
-		return;
-
-	printf("\nBootloader spec entries:\n\n");
-	printf("%-20s %-20s  %s\n", "device", "hwdevice", "title");
-	printf("%-20s %-20s  %s\n", "------", "--------", "-----");
-
-	blspec_for_each_entry(blspec, entry)
-		if (!entry->scriptpath)
+		else
 			printf("%s\n", entry->me.display);
+	}
 
 	blspec_free(blspec);
 }
-- 
1.8.4.rc3




More information about the barebox mailing list