From 5bd8ff5a93af56017a6e60a48db4efe7d1c638a4 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Fri, 2 Feb 2024 10:37:37 +0100 Subject: boot: Clean up output of list of boot devices Show the header for available boot devices only if one is found. Signed-off-by: Helge Deller --- src/boot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/boot.c b/src/boot.c index 22d4b6f..cfa110f 100644 --- a/src/boot.c +++ b/src/boot.c @@ -820,12 +820,16 @@ void find_initial_parisc_boot_drives(struct drive_s **harddisc, struct drive_s *select_parisc_boot_drive(char bootdrive) { - printf(" Available boot devices:\n"); + int found = 0; // Show menu items struct bootentry_s *pos; hlist_for_each_entry(pos, &BootList, node) { char desc[77]; + if (!found) { + printf(" Available boot devices:\n"); + found = 1; + } printf(" FWSCSI.%d.0 : %s\n", pos->drive->target , strtcpy(desc, pos->description, ARRAY_SIZE(desc))); } -- cgit v1.1