]> git.baikalelectronics.ru Git - uboot.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)
commit9617ae8c9ff0e4d4838c43d3c0d7cf5668dbf15b
tree3e93465ec1454e2b0247dcaff3a3265c47b01775
parentb210777f464cfb952fa04a016e2e3a31702ea232
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