From 512947d46f9fd7daf74c059ac8548cc98b294807 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Sun, 29 Jan 2012 21:55:51 +0100 Subject: 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 --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index cec9b499f..94e6ec63c 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); -- cgit v1.2.3