]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Add hack to make maintenance mode probably work when
authorRay Strode <rstrode@redhat.com>
Mon, 30 Jun 2008 21:54:42 +0000 (17:54 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 30 Jun 2008 21:55:15 +0000 (17:55 -0400)
plymouth is running

It was showing up completely blank before because console
was still redirected

TODO
src/main.c

diff --git a/TODO b/TODO
index c416b75c4960f6bfcf8cc5297d05cac29a47e2b8..2821b28a57c2dca2ca5287ce713c94e1cc2dc563 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,3 +8,5 @@
 - consider moving text code from ply-window to a ply-text-buffer analog of ply-frame-buffer
 - maybe watch for VT switches and do things like restoring text color palette and stopping drawing the framebuffer
 - clean up the event loop watch api to always be in terms of watch objects instead of function/user_data pairs.
+- Fix --hide-splash to properly unredirect console until next --show-splash or event better make attach-to-session
+  a client command, with detach-from-session a separate one
index 0c82db1d84420725e5b6663db8b3657ceb85d761..93363e2be12e9a6c57c6f0b5c0eaab2b6bb9c585 100644 (file)
@@ -191,6 +191,18 @@ on_hide_splash (state_t *state)
       ply_window_free (state->window);
       state->window = NULL;
     }
+
+  if (state->session != NULL)
+    {
+      ply_trace ("unredirecting console");
+      int fd;
+
+      fd = open ("/dev/console", O_RDWR | O_NOCTTY);
+      if (fd >= 0)
+          ioctl (fd, TIOCCONS);
+
+      close (fd);
+    }
 }
 
 static void