bootstd: Drop the old bootflow_scan_first()
This function is not used outside tests. Drop it and rename
bootflow_scan_dev() since it is how we start a scan now.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 1724e34..5d5ce7f 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -203,7 +203,7 @@
* mmc2 - nothing connected
*/
ut_assertok(env_set("boot_targets", NULL));
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(2, iter.num_devs);
ut_asserteq_str("mmc2.bootdev", iter.dev_order[0]->name);
ut_asserteq_str("mmc1.bootdev", iter.dev_order[1]->name);
@@ -211,7 +211,7 @@
/* Use the environment variable to override it */
ut_assertok(env_set("boot_targets", "mmc1 mmc2"));
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(2, iter.num_devs);
ut_asserteq_str("mmc1.bootdev", iter.dev_order[0]->name);
ut_asserteq_str("mmc2.bootdev", iter.dev_order[1]->name);
@@ -224,7 +224,7 @@
ut_assertok(env_set("boot_targets", NULL));
ut_assertok(bootstd_test_drop_bootdev_order(uts));
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(3, iter.num_devs);
ut_asserteq_str("mmc2.bootdev", iter.dev_order[0]->name);
ut_asserteq_str("mmc1.bootdev", iter.dev_order[1]->name);
@@ -239,7 +239,7 @@
iter.dev_order[2]->seq_ = 2;
bootflow_iter_uninit(&iter);
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(3, iter.num_devs);
ut_asserteq_str("mmc2.bootdev", iter.dev_order[0]->name);
ut_asserteq_str("mmc0.bootdev", iter.dev_order[1]->name);
@@ -268,7 +268,7 @@
/* 3 MMC and 3 USB bootdevs: MMC should come before USB */
console_record_reset_enable();
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(6, iter.num_devs);
ut_asserteq_str("mmc2.bootdev", iter.dev_order[0]->name);
ut_asserteq_str("usb_mass_storage.lun0.bootdev",
@@ -282,7 +282,8 @@
ucp->prio = 1;
bootflow_iter_uninit(&iter);
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, BOOTFLOWF_HUNT,
+ &bflow));
ut_asserteq(6, iter.num_devs);
ut_asserteq_str("usb_mass_storage.lun0.bootdev",
iter.dev_order[0]->name);
@@ -415,7 +416,8 @@
ut_assertok(bootstd_get_priv(&std));
ut_assertok(bootstd_test_drop_bootdev_order(uts));
- ut_assertok(bootflow_scan_first(&iter, BOOTFLOWF_SHOW | BOOTFLOWF_HUNT |
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter,
+ BOOTFLOWF_SHOW | BOOTFLOWF_HUNT |
BOOTFLOWF_SKIP_GLOBAL, &bflow));
ut_asserteq(BIT(MMC_HUNTER) | BIT(1), std->hunters_used);
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index 0b3a2fa..b9284fc 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -276,7 +276,8 @@
/* The first device is mmc2.bootdev which has no media */
ut_asserteq(-EPROTONOSUPPORT,
- bootflow_scan_first(&iter, BOOTFLOWF_ALL | BOOTFLOWF_SKIP_GLOBAL, &bflow));
+ bootflow_scan_first(NULL, NULL, &iter,
+ BOOTFLOWF_ALL | BOOTFLOWF_SKIP_GLOBAL, &bflow));
ut_asserteq(2, iter.num_methods);
ut_asserteq(0, iter.cur_method);
ut_asserteq(0, iter.part);
@@ -415,7 +416,7 @@
/* Try to boot the bootmgr flow, which will fail */
console_record_reset_enable();
- ut_assertok(bootflow_scan_first(&iter, 0, &bflow));
+ ut_assertok(bootflow_scan_first(NULL, NULL, &iter, 0, &bflow));
ut_asserteq(3, iter.num_methods);
ut_asserteq_str("sandbox", iter.method->name);
ut_assertok(inject_response(uts));