aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHeinrich Schuchardt2021-01-27 21:26:43 +0100
committerTom Rini2021-02-01 16:32:06 -0500
commitec9d19be8d6cabc820e133bb36a1386adcf0b3d1 (patch)
treec445564d88ddd4dbace2412fc57728156425af09 /fs
parente18bf3943b081507f5040afd5c1866f2e87f0da5 (diff)
cmd: load, emit error message for invalid block device
The load command should not silently return to the console prompt if an invalid block device is specified and no file is loaded. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/fs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 68a15553cc9..0c8f577a798 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -710,8 +710,10 @@ int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[],
if (argc > 7)
return CMD_RET_USAGE;
- if (fs_set_blk_dev(argv[1], (argc >= 3) ? argv[2] : NULL, fstype))
+ if (fs_set_blk_dev(argv[1], (argc >= 3) ? argv[2] : NULL, fstype)) {
+ log_err("Can't set block device\n");
return 1;
+ }
if (argc >= 4) {
addr = simple_strtoul(argv[3], &ep, 16);