]> git.dujemihanovic.xyz Git - u-boot.git/commit
tools: kwboot: Fix restoring terminal
authorPali Rohár <pali@kernel.org>
Fri, 23 Jul 2021 09:14:18 +0000 (11:14 +0200)
committerStefan Roese <sr@denx.de>
Sat, 31 Jul 2021 07:49:31 +0000 (09:49 +0200)
commitec0fe5b84e0bdb94bb381a2b50092b24497c2091
tree3e93465ec1454e2b0247dcaff3a3265c47b01775
parent43fef8d4feeecf6356646317f725a0e211da0c1c
tools: kwboot: Fix restoring terminal

Call tcsetattr() only if the file descriptor is valid. It may be
invalidated by previous lines (if it is not a tty descriptor).

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>
tools/kwboot.c