diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-09-24 23:06:51 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-10-01 11:07:13 +0200 |
commit | 2e81b3ab0eb46c8214d11d49cb65d9a5f13ee268 (patch) | |
tree | cb106f88d14b93d933be884736b104d5dc2e2637 /tools | |
parent | 48b3ea66cae97a06c35f117be8613c597aa2fca8 (diff) | |
download | u-boot-2e81b3ab0eb46c8214d11d49cb65d9a5f13ee268.zip u-boot-2e81b3ab0eb46c8214d11d49cb65d9a5f13ee268.tar.gz u-boot-2e81b3ab0eb46c8214d11d49cb65d9a5f13ee268.tar.bz2 |
tools: kwboot: Print new line after SPL output
There is no separation between output from the code from binary header
(U-Boot SPL in most cases) and subsequent kwboot output.
Print '\n' to make distinguishing these two easier.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kwboot.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/kwboot.c b/tools/kwboot.c index 4636622..2f4c61b 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -382,10 +382,12 @@ _is_xm_reply(char c) } static int -kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm) +kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm, int *non_xm_print) { int rc; + *non_xm_print = 0; + while (1) { rc = kwboot_tty_recv(fd, c, 1, blk_rsp_timeo); if (rc) { @@ -405,6 +407,7 @@ kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm) if (allow_non_xm) { putchar(*c); fflush(stdout); + *non_xm_print = 1; } } @@ -415,6 +418,7 @@ static int kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, int *done_print) { + int non_xm_print; int rc, retries; char c; @@ -432,7 +436,7 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, *done_print = 1; } - rc = kwboot_xm_recv_reply(fd, &c, allow_non_xm); + rc = kwboot_xm_recv_reply(fd, &c, allow_non_xm, &non_xm_print); if (rc) return rc; @@ -440,6 +444,9 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, kwboot_progress(-1, '+'); } while (c == NAK && retries-- > 0); + if (non_xm_print) + kwboot_printv("\n"); + rc = -1; switch (c) { |