mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
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>
This commit is contained in:
parent
e18bf3943b
commit
ec9d19be8d
1 changed files with 3 additions and 1 deletions
4
fs/fs.c
4
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);
|
||||
|
|
Loading…
Reference in a new issue