From 1736b4af0e8a30aa3e9d0720c07dfb70fb16dceb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 24 Apr 2023 13:49:47 +1200 Subject: bootstd: Report missing labels only when asked Use the -l flag to indicate whether to report missing uclasses. Also try to be more helpful when no devices are found. For example, when we see something 'scsi0' requested and nothing was found, this indicates that there are no SCSI devices, so show a suitable message. Move messages out of the low-level functions so that silent operation is possible. This means they are never reported unless BOOTSTD_FULL is enabled, since the -l flag cannot otherwise be set. Suggested-by: Tom Rini Signed-off-by: Simon Glass --- include/bootdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/bootdev.h') diff --git a/include/bootdev.h b/include/bootdev.h index b92ff4d4f15..e72ef3650f7 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -258,7 +258,7 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, * @devp: returns the device found, on success * @method_flagsp: If non-NULL, returns any flags implied by the label * (enum bootflow_meth_flags_t), 0 if none. Unset if function fails - * Return: 0 if OK, -EINVAL if the uclass is not supported by this board, + * Return: 0 if OK, -EPFNOSUPPORT if the uclass is not supported by this board, * -ENOENT if there is no device with that number */ int bootdev_find_by_any(const char *name, struct udevice **devp, -- cgit v1.2.3