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.
This commit is contained in:
Daan De Meyer
2024-04-22 15:28:26 +02:00
parent e6724664c3
commit f57705d67d
2 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ check_result_qemu_hook() {
fi
# Check if the shutdown initrd was executed at all
if ! grep -qE "^Hello from shutdown initrd\s*$" "$console_log"; then
if ! grep -q "Hello from shutdown initrd" "$console_log"; then
derror "Missing 'hello' message from shutdown initrd"
return 1
fi