diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-01-29 21:55:51 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-01-29 21:55:51 +0100 |
commit | 512947d46f9fd7daf74c059ac8548cc98b294807 (patch) | |
tree | ea73a2d9d0c7bf14000a9e3b892e9e5276870324 /src/main.c | |
parent | 9c07474c6fa296195dcdc734d77792dff95f5c35 (diff) |
main: don't force text mode in console_setup()
When systemd starts, plymouth may be already displaying progress
graphically. Do not switch the console to text mode at that time.
All other users of reset_terminal_fd() do the switch as before.
This avoids a graphical glitch with plymouth, especially visible with
vesafb, but could be also seen as a sub-second blink with radeon.
https://bugzilla.redhat.com/show_bug.cgi?id=785548
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index cec9b499f3..94e6ec63cc 100644 --- a/src/main.c +++ b/src/main.c @@ -200,12 +200,16 @@ static int console_setup(bool do_reset) { if (!do_reset) return 0; - if ((tty_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC)) < 0) { + tty_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC); + if (tty_fd < 0) { log_error("Failed to open /dev/console: %s", strerror(-tty_fd)); return -tty_fd; } - if ((r = reset_terminal_fd(tty_fd)) < 0) + /* We don't want to force text mode. + * plymouth may be showing pictures already from initrd. */ + r = reset_terminal_fd(tty_fd, false); + if (r < 0) log_error("Failed to reset /dev/console: %s", strerror(-r)); close_nointr_nofail(tty_fd); |