aboutsummaryrefslogtreecommitdiff
path: root/include/bootflow.h
diff options
context:
space:
mode:
authorSimon Glass2023-01-17 10:47:42 -0700
committerTom Rini2023-01-23 18:11:40 -0500
commitf0e358f07d75579b40eff8f723b280ab5d53d338 (patch)
treedd22560415627197881a374a11b4d55f4fff5af2 /include/bootflow.h
parentdcffa4428d0359fd09348fc05cf5b5ce2db38c5f (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 'include/bootflow.h')
-rw-r--r--include/bootflow.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index c201246c6de..3a93e4b5cab 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -123,6 +123,7 @@ enum bootflow_flags_t {
* @method: Current bootmeth
* @max_part: Maximum hardware partition number in @dev, 0 if there is no
* partition table
+ * @first_bootable: First bootable partition, or 0 if none
* @err: Error obtained from checking the last iteration. This is used to skip
* forward (e.g. to skip the current partition because it is not valid)
* -ESHUTDOWN: try next bootdev
@@ -144,6 +145,7 @@ struct bootflow_iter {
int part;
struct udevice *method;
int max_part;
+ int first_bootable;
int err;
int num_devs;
int cur_dev;