tools: kwboot: Disable non-blocking mode
authorPali Rohár <pali@kernel.org>
Fri, 24 Sep 2021 21:07:10 +0000 (23:07 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commit911515b339109d4bdf992441d5efdf4a6f885f95
treeb25f03ec57f132cd5807e33a0a57d445de2df3c4
parent24a471bc4bac8aa3a52ad7fa209494b6bc38e58d
tools: kwboot: Disable non-blocking mode

The kwboot utility does not handle EAGAIN / EBUSY errors, it expects
blocking mode on tty - it uses select() to check if data is available.

Disable non-blocking mode by clearing O_NDELAY flag which was set by
open().

We can't just take O_NDELAY from open(), because it is required there
until the CLOCAL flag is set on the tty.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
tools/kwboot.c