From: Pali Rohár <pali@kernel.org>
Date: Fri, 24 Sep 2021 21:06:47 +0000 (+0200)
Subject: tools: kwboot: Print newline on error when progress was not completed
X-Git-Tag: v2025.01-rc5-pxa1908~1694^2~2^2~29
X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=d5ba8dbd75c1b3f45c341341a1259114d894c45f;p=u-boot.git

tools: kwboot: Print newline on error when progress was not completed

When progress was not completed, current terminal position is in progress
bar. So print newline before printing error message to make error message
more readable.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
---

diff --git a/tools/kwboot.c b/tools/kwboot.c
index eb4b3fe230..0e533e3698 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -459,6 +459,7 @@ kwboot_xmodem(int tty, const void *_data, size_t size)
 	rc = kwboot_tty_send_char(tty, EOT);
 
 out:
+	kwboot_printv("\n");
 	return rc;
 
 can: