summaryrefslogtreecommitdiff
path: root/cmd/mvebu
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2022-07-26 16:11:59 +0200
committerStefan Roese <sr@denx.de>2022-07-29 10:02:43 +0200
commit09b0e20d73e371a7cba2db3a95c4173bd8209555 (patch)
tree4ea2883c6b4ca8698313e5c0f3ff7dca0844ea1b /cmd/mvebu
parent93c1358bcd6b249260f239042fba025764b4a89e (diff)
cmd: mvebu/bubt: Fix cmd main return value on error
Negative return value from cmd main function cause U-Boot to print criplic error message: exit not allowed from main input shell. Set return value on error to 1. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cmd/mvebu')
-rw-r--r--cmd/mvebu/bubt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 276069a0ef..ffa05bc201 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -870,11 +870,11 @@ int do_bubt_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
dst = find_bubt_dev(dst_dev_name);
if (!dst) {
printf("Error: Unknown destination \"%s\"\n", dst_dev_name);
- return -EINVAL;
+ return 1;
}
if (!bubt_is_dev_active(dst))
- return -ENODEV;
+ return 1;
/* Figure out the source device */
src = find_bubt_dev(src_dev_name);
@@ -891,15 +891,15 @@ int do_bubt_cmd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
image_size = bubt_read_file(src);
if (!image_size)
- return -EIO;
+ return 1;
err = bubt_verify(dst);
if (err)
- return err;
+ return 1;
err = bubt_write_file(dst, image_size);
if (err)
- return err;
+ return 1;
return 0;
}