aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-07-24 08:29:55 +0200
committerSimon Glass <sjg@chromium.org>2020-07-28 19:30:39 -0600
commitdb4ec4269eea3a1beae59d7ecc68aea98b14a471 (patch)
tree20e449df04302ab7825daa9baebac6234f96e85c /cmd
parent9beacb6c026bc979e840f022098c36f175555539 (diff)
downloadu-boot-db4ec4269eea3a1beae59d7ecc68aea98b14a471.zip
u-boot-db4ec4269eea3a1beae59d7ecc68aea98b14a471.tar.gz
u-boot-db4ec4269eea3a1beae59d7ecc68aea98b14a471.tar.bz2
cmd: host: return value of do_host_bind()
When trying to bind to a non-existent file the following output is displayed: => host bind 0 non_existent Failed to access host backing file 'non_existent' exit not allowed from main input shell. The last line is quite unexpected and due to an incorrect return value. If do_host_bind() fails, return CMD_RET_FAILURE (= 1). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/host.c b/cmd/host.c
index cd9c967..ff119da 100644
--- a/cmd/host.c
+++ b/cmd/host.c
@@ -51,7 +51,7 @@ static int do_host_bind(struct cmd_tbl *cmdtp, int flag, int argc,
printf("** Bad device specification %s **\n", dev_str);
return CMD_RET_USAGE;
}
- return host_dev_bind(dev, file);
+ return !!host_dev_bind(dev, file);
}
static int do_host_info(struct cmd_tbl *cmdtp, int flag, int argc,