summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-06-30 17:54:42 -0400
committerRay Strode <rstrode@redhat.com>2008-06-30 17:55:15 -0400
commit70b2e61d6292cfeebe95300b5f2dbac22e157420 (patch)
tree93ba83307840a5a7caaea4af81d3f5bd25694524
parentf0412cefff84f1cb654c4d152287723b7dbac276 (diff)
downloadplymouth-70b2e61d6292cfeebe95300b5f2dbac22e157420.tar.gz
plymouth-70b2e61d6292cfeebe95300b5f2dbac22e157420.tar.xz
plymouth-70b2e61d6292cfeebe95300b5f2dbac22e157420.zip
Add hack to make maintenance mode probably work when
plymouth is running It was showing up completely blank before because console was still redirected
-rw-r--r--TODO2
-rw-r--r--src/main.c12
2 files changed, 14 insertions, 0 deletions
diff --git a/TODO b/TODO
index c416b75..2821b28 100644
--- 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
diff --git a/src/main.c b/src/main.c
index 0c82db1..93363e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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