aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2024-02-02 10:37:37 +0100
committerHelge Deller <deller@gmx.de>2024-02-02 10:37:37 +0100
commit5bd8ff5a93af56017a6e60a48db4efe7d1c638a4 (patch)
tree15c9072c54b0f2401d0d2146113b105f8ddae814
parent71e951fd0492004a0e893692d324b11ceee9db41 (diff)
downloadseabios-hppa-5bd8ff5a93af56017a6e60a48db4efe7d1c638a4.zip
seabios-hppa-5bd8ff5a93af56017a6e60a48db4efe7d1c638a4.tar.gz
seabios-hppa-5bd8ff5a93af56017a6e60a48db4efe7d1c638a4.tar.bz2
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 <deller@gmx.de>
-rw-r--r--src/boot.c6
1 files changed, 5 insertions, 1 deletions
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)));
}