From e4b694893f6cf1e4ac934f2ecb57c8e77a17e5b2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 17 Jan 2023 10:48:10 -0700 Subject: bootstd: Allow iterating to the next label in a list Add a function which moves to the next label in a list of labels. This allows processing the boot_targets environment variable. This works using a new label list in the bootflow iterator. The logic to set this up is included in a subsequent commit. Signed-off-by: Simon Glass --- include/bootflow.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/bootflow.h') diff --git a/include/bootflow.h b/include/bootflow.h index 81dbcd6754b..8ab32ffd666 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -175,6 +175,8 @@ enum bootflow_meth_flags_t { * @cur_dev: Current bootdev number, an index into @dev_order[] * @dev_order: List of bootdevs to scan, in order of priority. The scan starts * with the first one on the list + * @labels: List of labels to scan for bootdevs + * @cur_label: Current label being processed * @num_methods: Number of bootmeth devices in @method_order * @cur_method: Current method number, an index into @method_order * @first_glob_method: First global method, if any, else -1 @@ -196,6 +198,8 @@ struct bootflow_iter { int num_devs; int cur_dev; struct udevice **dev_order; + const char *const *labels; + int cur_label; int num_methods; int cur_method; int first_glob_method; -- cgit v1.2.3