From: Pali Rohár <pali@kernel.org>
Date: Fri, 23 Jul 2021 09:14:19 +0000 (+0200)
Subject: tools: kwboot: Print trailing newline after terminal is terminated
X-Git-Tag: v2025.01-rc5-pxa1908~1770^2~22
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=49a0a3b8b6feb36e95827d41249d3728b67ecced;p=u-boot.git

tools: kwboot: Print trailing newline after terminal is terminated

Print trailing newline as the last printed byte can be something
different.

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>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
---

diff --git a/tools/kwboot.c b/tools/kwboot.c
index 7fa742d84c..941f4228f9 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -560,6 +560,7 @@ kwboot_terminal(int tty)
 
 	if (in >= 0)
 		tcsetattr(in, TCSANOW, &otio);
+	printf("\n");
 out:
 	return rc;
 }