diff options
| author | Simon Glass <[email protected]> | 2023-01-17 10:47:34 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-01-23 18:11:40 -0500 |
| commit | c7b63d500df707bd9c9041e0dae3a25f56098978 (patch) | |
| tree | 1e9e545f889364b42b4772393bfd93f0e365baa4 /include/bootdev.h | |
| parent | bd90b092882099afa3786829036c82d6a4241fc8 (diff) | |
bootstd: Support running bootdev hunters
Add a way to run a bootdev hunter to find bootdevs of a certain type. Add
this to the 'bootdev hunt' command. Test for this are added in a later
patch, since a useful test needs some hunters to work with.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/bootdev.h')
| -rw-r--r-- | include/bootdev.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/bootdev.h b/include/bootdev.h index cafb5285a28..deef7890489 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -263,6 +263,20 @@ int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp); */ void bootdev_list_hunters(struct bootstd_priv *std); +/** + * bootdev_hunt() - Hunt for bootdevs matching a particular spec + * + * This runs the selected hunter (or all if @spec is NULL) to try to find new + * bootdevs. + * + * @spec: Spec to match, e.g. "mmc0", or NULL for any. If provided, this must + * match a uclass name so that the hunter can be determined. Any trailing number + * is ignored + * @show: true to show each hunter before using it + * Returns: 0 if OK, -ve on error + */ +int bootdev_hunt(const char *spec, bool show); + #if CONFIG_IS_ENABLED(BOOTSTD) /** * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated) |
