terminal-util: Enable line wrapping in reset_terminal_fd()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 19 Apr 2024 19:58:18 +0000 (21:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 22 Apr 2024 13:28:26 +0000 (15:28 +0200)
commitf57705d67d13593a05c95ef082ce85caeb18b062
tree3a487a189b2c596e91679099fea3aa777952ff0b
parente6724664c3d8fa8669746192f647c1845f9857ff
terminal-util: Enable line wrapping in reset_terminal_fd()

The qemu seabios firmware disables serial console line wrapping. Let's
make sure we re-enable it again when we reset a terminal to some sane
defaults.

To avoid potentially blocking on writing to the terminal, we put it
in nonblocking mode and add a timeout of 50ms.
src/basic/terminal-util.c
test/TEST-08-INITRD/test.sh