summaryrefslogtreecommitdiff
path: root/boot/bootflow.c
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2024-02-21 13:41:44 +0100
committerTom Rini <trini@konsulko.com>2024-03-04 10:25:47 -0500
commit1132471405512619241dc879861f1b5beb95c48c (patch)
treede05f1909883b36d6fc7c0993522403713aba307 /boot/bootflow.c
parentc15d73d18925dc2dbb3082874b61b924bad9388c (diff)
bootstd: support scanning a single partition
The "bootflow" command currently doesn't support scanning a single partition. This is inconvenient in setups with multiple bootable partitions within a single disk, but only one is desired. Support scanning a single disk partition. Specifically, support the syntax: bootflow scan mmc1:4 which scans only mmc device 1, partition 4. Signed-off-by: Nam Cao <namcao@linutronix.de>
Diffstat (limited to 'boot/bootflow.c')
-rw-r--r--boot/bootflow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 05484fd5b1b..68bf99329ab 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -217,6 +217,9 @@ static int iter_incr(struct bootflow_iter *iter)
}
}
+ if (iter->flags & BOOTFLOWIF_SINGLE_PARTITION)
+ return BF_NO_MORE_DEVICES;
+
/* No more bootmeths; start at the first one, and... */
iter->cur_method = 0;
iter->method = iter->method_order[iter->cur_method];