mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
bootflow: Show an empty filename when there is none
At present 'bootflow list' shows <NULL> for the filename when it is not present. Show an empty string instead, since that is more user-friendly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
00613bc19a
commit
c3867e2e98
2 changed files with 13 additions and 11 deletions
|
@ -167,21 +167,22 @@ static int bootflow_cmd_scan_e(struct unit_test_state *uts)
|
|||
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
|
||||
ut_assert_nextlinen("---");
|
||||
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
|
||||
ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole ");
|
||||
ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
|
||||
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole ");
|
||||
ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
|
||||
|
||||
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
|
||||
ut_assert_nextline(" 2 extlinux media mmc 0 mmc1.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 2 extlinux media mmc 0 mmc1.bootdev.whole ");
|
||||
ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
|
||||
ut_assert_nextline(" 3 efi media mmc 0 mmc1.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 3 efi media mmc 0 mmc1.bootdev.whole ");
|
||||
ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
|
||||
ut_assert_nextline(" 4 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
|
||||
ut_assert_nextline(" 5 efi fs mmc 1 mmc1.bootdev.part_1 efi/boot/bootsbox.efi");
|
||||
|
||||
ut_assert_skip_to_line("Scanning bootdev 'mmc0.bootdev':");
|
||||
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole <NULL>");
|
||||
ut_assert_skip_to_line(
|
||||
" 3f efi media mmc 0 mmc0.bootdev.whole ");
|
||||
ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
|
||||
ut_assert_nextline("No more bootdevs");
|
||||
ut_assert_nextlinen("---");
|
||||
|
@ -192,10 +193,11 @@ static int bootflow_cmd_scan_e(struct unit_test_state *uts)
|
|||
ut_assert_nextline("Showing all bootflows");
|
||||
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
|
||||
ut_assert_nextlinen("---");
|
||||
ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole <NULL>");
|
||||
ut_assert_skip_to_line(" 4 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
|
||||
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole <NULL>");
|
||||
ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole ");
|
||||
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole ");
|
||||
ut_assert_skip_to_line(
|
||||
" 4 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
|
||||
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole ");
|
||||
ut_assert_nextlinen("---");
|
||||
ut_assert_nextline("(64 bootflows, 1 valid)");
|
||||
ut_assert_console_end();
|
||||
|
@ -384,7 +386,7 @@ static int bootflow_system(struct unit_test_state *uts)
|
|||
console_record_reset_enable();
|
||||
ut_assertok(run_command("bootflow scan -lH", 0));
|
||||
ut_assert_skip_to_line(
|
||||
" 0 efi_mgr ready (none) 0 <NULL> <NULL>");
|
||||
" 0 efi_mgr ready (none) 0 <NULL> ");
|
||||
ut_assert_skip_to_line("No more bootdevs");
|
||||
ut_assert_skip_to_line("(2 bootflows, 2 valid)");
|
||||
ut_assert_console_end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue