commit 6baab7a8f8 was the
result of Ray Strode splitting part of a larger patch
out. The splitting and subsequent modifications weren't
completely right.
This commit contains some fixes to address the problems
with those changes.
This commit adds plymouth.ignore-serial-consoles kernel command
line for OLPC to use.
Eventually, we'll support multiple plugins at once, and we can
run details on the serial console and e.g. two-step on the main
console and then this argument won't be needed.
commit e810532e5d contained
a function called add_consoles_from_file that was a badly
modified version of add_consoles_from_kernel_command_line
changed to read from /sys/class/tty/console/active instead
of /proc/cmdline.
Previously, if we had console=SOMETHING on the kernel command
line, then we would assume the user is using serial consoles
and force details. This translated to if add_consoles_from_file
finds any devices in /sys/class/tty/console/active force details.
Of course, /sys/class/tty/console/active contains tty0 even when
the user doesn't specify console=tty0 on the kernel command line,
so this broke show-splash calls.
This commit changes the logic bit. We now only force details if
there is some console in the list that isn't tty0.
This restores show-splash functionality.
add_consoles_from_file was a little fast and loose in its parsing.
This commit makes it a little more fault tolerant.
Patch split from larger patch, and modified by Ray Strode.
If ply_event_loop_handle_timeouts() is called before the events returned
by epoll_wait() are given references, a timeout handler can prematurely
free an event source by calling ply_event_loop_stop_watching_fd leading
to crashes and other undefined behaviour since
ply_event_loop_process_pending_events() dispatches the event sources
returned by epoll_wait() after the timeouts have been handled.
Thanks to cjwatson for a simpler solution to my original fix.
Minor changes by Ray Strode.
https://bugs.freedesktop.org/show_bug.cgi?id=28548
Previously OLPC used --kernel-command-line to make plymouth
ignore specific consoles. That no longer works, now that we
read from /sys/class/tty/console/active
This commit adds an escape hatch, a way to get back to the old
behavior.
add_consoles_from_file suffers from a sever case of
cut-and-paste-itis. This commit renames its variable
"remaining_command_line" to "remaining_file_contents" so that
the variable name actually makes sense.
It did not terminate at space so the log file to use was not
properly defined and any additional kernel command line args were
added to the end of the file name.
The /dev/fb symlink doesn't get created with any recent udev version.
dracut puts it in place "by hand" before starting plymouthd, which is
why things aren't broken in configurations that use dracut's plymouth
module.
Update the default device path so that it works out-of-the-box in
other setups too.
This reverts commit 841068ba12.
That commit made plymouthd hang around until the last round
of slayings by init to keep the splash screen up as long as
possible.
That adds 5 seconds to shut down in some cases, though, so
is wrong. Instead we need a solution that keeps the splash
around after plymouth exits.
See http://bugzilla.redhat.com/744932
We currently read the list of available consoles from the
kernel command line.
This isn't the most reliable way to do things.
This commit changes the code to read
/sys/class/tty/console/active
instead.
It's important we close all terminals in the shutdown path,
so they all get unlocked and returned to cooked mode.
Previously, we would just close the local console terminal,
which meant other terminals would end up left in a broken state.
We call the add_display_and_keyboard_for_terminal function for
every console passed into the kernel command line and once for
/dev/tty1 if no console line is passed in. This function
repeatedly, reinitializes state->terminal with whatever
terminal is passed in each time its called.
This commit changes add_display_and_keyboard_for_terminal to not
touch state->terminal and instead makes the callers do it
(if appropriate)
Right now we pass a terminal to the constructor of the boot splash
object. This terminal is used for going to KD_TEXT mode when
ctrl-T is tapped or when hiding the splash.
We only need to do this, though, when:
1) we're running on a local vt
2) we're showing graphics
the boot-splash code has all the knowledge it needs to figure these
two things out on its own, and furtermore it already can figure out
which terminal is the relevant one without being told at construct
time.
This commit adds those smarts to the boot splash code.
check_for_consoles has another bug (surprised?) where it would
jump too many characters forward if the command line has
console=tty0 in it, since tty0 is transparently changed to /dev/tty1.
walters pointed out the README had some stale information in
it. I've copy and pasted the wiki text in, now, so there
will be hopefully a small quantity of said stale information.
alloca() isn't a good idea to use, in general, because it provides
undefined behavior when it fails.
This commit changes the epoll event buffer from being stack allocated
to static to avoid any potentially problems resulting from stack
space exhaustion.
https://bugs.freedesktop.org/show_bug.cgi?id=41562
commit 4081bd29fb changed
our keyboard handling code to treat newline instead of
carriage return as the enter key.
That commit fixed up the tty settings to work under these
new assumptions. It failed to update the X11 code, though.
This commit fixes the X11 renderer plugin so it works in
the same way.