[PATCH] [FS] Print error message for unknown device type
Wolfgang Denk
wd at denx.de
Wed Jan 22 12:08:52 CET 2020
File system commands like "ls" etc. require a device type parameter.
If an unknown type is specified, they return an error code but no
visible feedback to the user:
-> ls FOOBAR 1:1 /
->
Add an error message to make clear what happens, and why.
Signed-off-by: Wolfgang Denk <wd at denx.de>
---
disk/part.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/disk/part.c b/disk/part.c
index 8982ef3bae..14000835c8 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -512,8 +512,10 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
/* Look up the device */
dev = blk_get_device_by_str(ifname, dev_str, dev_desc);
- if (dev < 0)
+ if (dev < 0) {
+ printf("** Unknown device type %s **\n", ifname);
goto cleanup;
+ }
/* Convert partition ID string to number */
if (!part_str || !*part_str) {
--
2.23.0
More information about the U-Boot
mailing list