diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 10:47:41 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-23 18:11:40 -0500 |
commit | dcffa4428d0359fd09348fc05cf5b5ce2db38c5f (patch) | |
tree | 4768322f3c36e6a8537b5df083ab68b44b2fd071 /include | |
parent | 4146c823fc27c1a4e06d1d25e0a2d4644948a5fc (diff) |
part: Add a function to find the first bootable partition
If a disk has a bootable partition we are expected to use it to locate the
boot files. Add a function to find it.
To test this, update mmc1 to have two paritions, fixing up other tests
accordingly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/part.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h index 807370d942..be75c73549 100644 --- a/include/part.h +++ b/include/part.h @@ -303,6 +303,14 @@ part_get_info_by_dev_and_name_or_num(const char *dev_iface, } #endif +/** + * part_get_bootable() - Find the first bootable partition + * + * @desc: Block-device descriptor + * @return first bootable partition, or 0 if there is none + */ +int part_get_bootable(struct blk_desc *desc); + struct udevice; /** * part_create_block_devices - Create block devices for disk partitions |