Skip to contentSkip to conversation

cmd: load, emit error message for invalid block device

PATCH New Heinrich Schuchardt 3 participants 3 messages Jan 27, 2021 – Feb 2, 2021 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/fs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/fs.c +3 -1
index 68a15553cc..0c8f577a79 100644
@@ -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);

--
2.29.2

#2 lore raw

PATCH 1/1 cmd: load, emit error message for invalid block device

In reply to Heinrich Schuchardt
Quoted 5 lines · Heinrich Schuchardt

The load command should not silently return to the console prompt if an invalid block device is specified and no file is loaded.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210202/b3b1baac/attachment.sig>