diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 10:47:42 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-23 18:11:40 -0500 |
commit | f0e358f07d75579b40eff8f723b280ab5d53d338 (patch) | |
tree | dd22560415627197881a374a11b4d55f4fff5af2 /test/boot/bootflow.c | |
parent | dcffa4428d0359fd09348fc05cf5b5ce2db38c5f (diff) |
bootstd: Only scan bootable partitions
At present all partitions are scanned, whether marked bootable or not.
Use only bootable partitions, defaulting to partition 1 if none is
found.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/boot/bootflow.c')
-rw-r--r-- | test/boot/bootflow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index 38ffe8fa9be..f852b6e9b6f 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -316,14 +316,14 @@ static int bootflow_iter(struct unit_test_state *uts) bootflow_free(&bflow); /* Then more to partition 2 which exists but is not bootable */ - ut_asserteq(-EPERM, bootflow_scan_next(&iter, &bflow)); + ut_asserteq(-EINVAL, bootflow_scan_next(&iter, &bflow)); ut_asserteq(2, iter.num_methods); ut_asserteq(0, iter.cur_method); ut_asserteq(2, iter.part); ut_asserteq(0x1e, iter.max_part); ut_asserteq_str("syslinux", iter.method->name); ut_asserteq(0, bflow.err); - ut_asserteq(BOOTFLOWST_PART, bflow.state); + ut_asserteq(BOOTFLOWST_MEDIA, bflow.state); bootflow_free(&bflow); bootflow_iter_uninit(&iter); |