]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[terminal] Don't stomp over original tty lock settings
authorRay Strode <rstrode@redhat.com>
Fri, 7 May 2010 18:49:09 +0000 (14:49 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 7 May 2010 18:49:09 +0000 (14:49 -0400)
We were repetedly saving over the original tty lock settings,
causing the tty to stay locked after boot up.

src/libply-splash-core/ply-terminal.c

index f71f25af51247a298eb3a5c767c585ed09f6fabd..ff59d7195cb1261ac5eb09773f7e0398550f97d9 100644 (file)
@@ -188,7 +188,8 @@ ply_terminal_set_unbuffered_input (ply_terminal_t *terminal)
   if (tcsetattr (terminal->fd, TCSANOW, &term_attributes) != 0)
     return false;
 
-  if (ioctl (terminal->fd, TIOCGLCKTRMIOS, &locked_term_attributes) == 0)
+  if (!terminal->original_locked_term_attributes_saved &&
+      ioctl (terminal->fd, TIOCGLCKTRMIOS, &locked_term_attributes) == 0)
     {
       terminal->original_locked_term_attributes = locked_term_attributes;
       terminal->original_locked_term_attributes_saved = true;