Skip to content

Commit 005e349

Browse files
Correct menu printing format
The u-boot and linux menu display would incorrectly format the last line of the menu when it ended on column 0. The main menu and help menu required an additional check for the column that ended the menu and inserts an additional newline when it ended on column 0. Signed-off-by: Rod Frazer <rod.frazer@intel.com>
1 parent abd5f61 commit 005e349

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

common_sw/linux_apps/boot_app.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,9 @@ int main(void)
716716
i++;
717717
}
718718

719+
if(column == 1)
720+
puts("");
721+
719722
puts("");
720723
printf ("Enter menu selection:");
721724
fflush(stdout);
@@ -871,6 +874,9 @@ void help_menu(struct menu_s *menus) {
871874
i++;
872875
}
873876

877+
if(column == 1)
878+
puts("");
879+
874880
puts("");
875881
printf ("Enter help menu selection:");
876882
fflush(stdout);

common_sw/u-boot_standalone_apps/boot_app.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,9 @@ int boot_app(int argc, char *const argv[])
751751
i++;
752752
}
753753

754+
if(column == 1)
755+
puts("\n");
756+
754757
puts("\n");
755758
printf ("Enter menu selection:");
756759

@@ -831,6 +834,9 @@ void help_menu(struct menu_s *menus) {
831834
i++;
832835
}
833836

837+
if(column == 1)
838+
puts("\n");
839+
834840
puts("\n");
835841
printf ("Enter help menu selection:");
836842

0 commit comments

Comments
 (0)