summaryrefslogtreecommitdiff
path: root/tools/kwboot.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-07 11:32:34 -0400
committerTom Rini <trini@konsulko.com>2018-08-07 11:32:34 -0400
commit63d54c9c598079d3f30efb9e71be8fe5345a451d (patch)
treea084c5c6ce8111a40acfc21bde7678d198884e10 /tools/kwboot.c
parent373413cce6260acdf14de762f94010b627a77a3b (diff)
parent79a0188679df53862e06fd7c8fecb7f3d7d44502 (diff)
Merge git://git.denx.de/u-boot-marvell
Diffstat (limited to 'tools/kwboot.c')
-rw-r--r--tools/kwboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 8a421cda4ea..50ae2b4b77b 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -182,7 +182,7 @@ kwboot_tty_recv(int fd, void *buf, size_t len, int timeo)
}
n = read(fd, buf, len);
- if (n < 0)
+ if (n <= 0)
goto out;
buf = (char *)buf + n;
@@ -466,7 +466,7 @@ kwboot_term_pipe(int in, int out, char *quit, int *s)
char _buf[128], *buf = _buf;
nin = read(in, buf, sizeof(buf));
- if (nin < 0)
+ if (nin <= 0)
return -1;
if (quit) {
@@ -821,7 +821,7 @@ main(int argc, char **argv)
perror("debugmsg");
goto out;
}
- } else {
+ } else if (bootmsg) {
rc = kwboot_bootmsg(tty, bootmsg);
if (rc) {
perror("bootmsg");