]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
main: Restore terminal line discipline on hide splash
authornerdopolis <bluescreen_avenger@verizon.net>
Fri, 8 Dec 2023 15:30:37 +0000 (10:30 -0500)
committern3rdopolis <bluescreenavenger@gmail.com>
Fri, 8 Dec 2023 17:45:53 +0000 (17:45 +0000)
At the moment if a program calls `plymouth hide-splash`
plymouth keeps the terminal in raw mode. That is wrong,
because programs call `plymouth hide-splash` specifically
so they can use the terminal.

This commit makes plymouth restore the terminal to cooked
mode so it's ready for the next program.

src/main.c

index 4617dfcf8973e06bbbcf829e590a4662b2d9928f..e301051b898734129ef407f201d6901bf2a7f373 100644 (file)
@@ -1226,8 +1226,10 @@ hide_splash (state_t *state)
 
         ply_boot_splash_hide (state->boot_splash);
 
-        if (state->local_console_terminal != NULL)
+        if (state->local_console_terminal != NULL) {
                 ply_terminal_set_mode (state->local_console_terminal, PLY_TERMINAL_MODE_TEXT);
+                ply_terminal_set_buffered_input (state->local_console_terminal);
+        }
 }
 
 static void