Ray Strode [Wed, 12 Oct 2011 19:50:56 +0000 (15:50 -0400)]
main: fix kernel command line parsing
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.
Ray Strode [Mon, 10 Oct 2011 14:54:00 +0000 (10:54 -0400)]
README: resync from wiki
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.
Colin Walters [Sun, 9 Oct 2011 19:54:15 +0000 (15:54 -0400)]
autogen.sh: rework to be more buildsystem friendly
One of the goals laid out in
http://people.gnome.org/~walters/docs/build-api.txt
is to get projects to have autogen.sh scripts that
don't invoke configure after generating it.
This commit does that along with some other small
modifications designed to help be more confromant
with the Build API referenced in the above url.
James Hunt [Fri, 7 Oct 2011 15:32:46 +0000 (16:32 +0100)]
event-loop: use static buffer instead of stack allocation buffer
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.
This is because when the kernel is closing a tty down, that
tty is unavailable to userspace to reopen.
Unfortunately, that commit neglected to inform the ply-keyboard
part of the code when the terminal retry was successful. The
upshot of this, is that if plymouthd needs to retry opening the
tty, then the splash screens lose control over the keyboard.
This commit changes how input notification is sent to the keyboard
handling code, so the tty disconnects are transparent.
Ray Strode [Tue, 29 Mar 2011 02:14:34 +0000 (22:14 -0400)]
systemd: toggle systemd messages when toggling console redirection
Normally systemd is very mute about messages. It's important,
though for it to be chatty when plymouth is running so we can
show verbose messages to the user when they hit escape.
This commit adds a new --enable-systemd-integration configure
flag which explicitly tells systemd when to print messages to
the console.
This may get dropped in the future in lieu of init script
changes doing this instead of plymouth directly.
Ray Strode [Wed, 23 Mar 2011 16:04:56 +0000 (12:04 -0400)]
main: add new --kernel-command-line option
It's really annoying when you're running plymouthd in
debug mode and don't happen to have "splash" on your kernel
command line and then need to reboot.
This commit adds a new debug option to override the kernel
command line for ths system.
Colin Watson [Sat, 12 Mar 2011 21:31:15 +0000 (16:31 -0500)]
upstart-bridge: add new helper program
This commit adds a new program, plymouth-upstart-bridge,
the listens for upstart state changes and sends them to plymouth,
or prints them out as appropriate.
Ray Strode [Wed, 9 Mar 2011 22:22:03 +0000 (17:22 -0500)]
drm: don't light up unlit monitors
If a monitor is dark when plymouth is started, we shouldn't
try to light it up. There are rules on which outputs can be
attached to which controllers and we're very likely to break
those rules just assigning things willy-nilly.
The kernel should set us up in the way it thinks is best anyway.
There's no reason to second guess the kernel here.
Ray Strode [Fri, 4 Mar 2011 19:57:52 +0000 (14:57 -0500)]
terminal: Keep retrying to reopen tty on EIO after hang up
If the tty hangs up on us, the kernel will return EIO while it's
closing down. As far as I know, there's no way to get notified
when it's back up again, so just keep retrying in a loop over
the course of a second or so. Eventually give up, though.
This is really suboptimal and suggests we should get away from
using ttys for input at some point.
client: do not wait forever if daemon is not started
Currently plymouth --wait will wait forever if daemon is not
started. This does not look right - we were asked to wait for
daemon to stop and daemon is obviously stopped. So make it
exit right away in this case.
This avoids timeouts during systemd boot if plymouth happened to be
stopped (or never started) before plymouth-quit-wait had chance to
start.
Ray Strode [Fri, 18 Feb 2011 18:45:55 +0000 (13:45 -0500)]
terminal: unlock tty before mucking with it
It seems that sometimes when the tty is stolen from us
it remains locked when we get it back. That would be okay
if the attributes were still kosher, but they aren't.
This commit unlocks the tty before trying to reinitialize
the terminal with suitable attributes.
Debugged by Andrey Borzenkov <arvidjaar@gmail.com>
Lucian Muresan [Tue, 1 Feb 2011 19:05:45 +0000 (14:05 -0500)]
drm: reduce minimum build requirements
This patch adds the respective configure options to make it possible to
disable libdrm_intel, libdrm_radeon, libdrm_nouveau, and libkms
independently from each other.
Martin Pitt [Fri, 14 Jan 2011 23:32:10 +0000 (18:32 -0500)]
pixel-buffer: Fix overflow in blend_two_pixel_values
It was using 16bit types to hold the intermiediate
results of the blend, but for high intensity,
low opacity input values it could need up to
17 bits to prevent overflow.
Andrey Borzenkov [Thu, 18 Nov 2010 18:35:11 +0000 (21:35 +0300)]
utils: if concrete/abstract socket selection
Commit 9de731ed29db4670c1641aedd945c56fd1a3feed caused
plymouth to erroneously drop the leading '\0' on the old
abstract socket making fallback socket support not work.
As result new clients (after update) can no longer communicate
with old running daemons (such as from the initrd).
This commit restores the leading '\0' for both
abstract sockets, trimmed and non-trimmed.
Ray Strode [Mon, 15 Nov 2010 18:56:01 +0000 (13:56 -0500)]
terminal: Don't set ISTRIP in terminal attributes
In certain error paths plymouth would erroneously set
ISTRIP on the terminal. This is bogus in the same way
the changes fixed by commit ea394383c54dda771dcf59e7ec11280fa945280b
were bogus.
Ray Strode [Wed, 13 Oct 2010 12:26:42 +0000 (08:26 -0400)]
populate-initrd: pre-expand logofile variable
The logofile by default is $datadir/plymouth.png
$datadir contains a reference to $datarootdir, so
we need to preexpand the variable in configure, for
the right value to get written to plymouth-populate-initrd.
populate-initrd: don't hardcode client and daemon path
When not installing in system root, the populate initrd script would not
install the client or daemon due to the paths being hardcoded.
Environmental variables are also now available to override the defaults.
The png_set_gray_1_2_4_to_8 function is deprecated and has been removed
from libpng14. Now png_set_expand_gray_1_2_4_to_8 is used instead which
is compatible with libpng-1.2.9 and greater.
Ray Strode [Wed, 6 Oct 2010 22:07:08 +0000 (18:07 -0400)]
branch-merge: clean up socket name
The plymouth client talks to the plymouth daemon via
an abstract socket. There aren't a lot of "rules" for
the name of the abstract socket, and so plymouth has just
used "/ply-boot-protocol" for the name. While this is
perfectly valid, a number programs (hal, udev, etc) use
the convention "/org/freedesktop/program".
"/org/freedesktop/plymouthd" is certainly much nicer than
"/ply-boot-protocol" so we're going to change to that, and
fall back to the old name for compatibility.
One other niggle is trailing zeros in the name. The socket
address is stored in a fixed size buffer. Traditionally,
programms would pass the size of the entire socket structure,
including the full size of the aaddress buffer to bind and
connect. This means that any NUL bytes in the address buffer
after the address become part of the address. This means users
looking at /proc/net/unix will see all the extra NUL bytes.
One trick that some programs employee to skirt around this problem,
is to pass only the size of the structure less the trailing
NUL bytes of the address buffer to bind and connected. While maybe
not 100% kosher, this works okay in practice.
The \0 is because it's an abstract socket, and abstract sockets
have a leading NUL. The code always ignores the NUL though and
adds it back later, so it's not needed.
Ray Strode [Wed, 6 Oct 2010 21:43:50 +0000 (17:43 -0400)]
utils: add support for "trimmed abstract" sockets
Right now plymouth listens on an abstract socket with a name
that has a bunch of trailing NUL bytes. These zeroes uglify
the output of /proc/net/unix among other things.
This commit adds support for a new "trimmed abstract" socket
type, which drops the zeroes.
A subsequent commit will actually change plymouthd to use the
new api.