Commit graph

1512 commits

Author SHA1 Message Date
Ray Strode
4469b8719e [drm] Store color depth in buffers
We only really support full color layouts at the moment
for kernel modesetting drivers, but this commit adds a
"color_depth" member to the buffer structs so we can at
least recognize non-conforming buffers.
2010-08-18 16:18:12 -04:00
Ray Strode
234d7aa97f [main] Properly handle no serial consoles
The previous commit introduced an error where
console could potentially be accessed while
NULL.

This commit addresses that problem.
2010-08-04 21:05:21 -04:00
Ray Strode
c40fd792b6 [main] Ignore duplicate serial consoles on kernel command line
Right now if a user erroneously puts, e.g., console=ttyS0 twice
on their kernel command line, plymouth will open that tty twice
and write to it twice, and read from it twice, etc.

This commit filters those duplicates out.
2010-08-03 18:29:48 -04:00
Ray Strode
57108e50d1 [boot-splash] Add built-in plugin
There are times when plymouth is running that the filesystem isn't
accessible.  For instance, if a user has /usr as a separate partition,
then when first leaving the initrd, plymouth won't have access to its
plugins.

In those cases we really need to survive if the user hits escape.

This commit compiles details into the binary.  In this way, if the
plugins aren't available, we still have something to fall back to.
2010-07-27 18:46:03 -04:00
Ray Strode
8f8a2c906e [main] Parse args at end of /proc/cmdline properly
We weren't treating \n as an acceptable boundary
2010-07-27 18:46:03 -04:00
Ray Strode
b1c8557cc5 [terminal] fix debug statement
It was missing an argument.
2010-07-23 22:19:30 -04:00
Ray Strode
3e3f6fd866 [configure] Bump configure to 0.8.4
We aren't doing a release yet, this is just prep work
for an eventual release.
2010-07-23 22:15:48 -04:00
Charlie Brej
91fada4818 [main] only look for a shell in valid returned prefixed strings
Fixes a segfault if no "init=" is present
2010-07-21 15:54:36 +01:00
Ray Strode
aa3ee475ec [main] Don't watch for keyboard input if no keyboard
In the event should_ignore_show_splash_calls () returns
true, we won't ever have a keyboard set.  This commit
make sure that we don't try to use the keyboard if its
unavailable.
2010-07-21 00:21:16 -04:00
Ray Strode
9311c9d2fd [main] Try to be smarter about init=/foo on kernel command line
Right now, we put plymouth into a sort of degraded mode when we
find init=/anything on the kernel command line.  This is so if
the user does init=/bin/sh to get fix their system, we don't
get in the way.

This breaks plymouth for things like init=/sbin/bootchartd and even
init=/sbin/init.  We've previously had a plymouth.override-splash
kernel command line option to force plymouth on in those cases.

This commit flips things around a bit.  Now init=/sbin/bootchartd
will work by default and there's a new option
plymouth.ignore-show-splash which forces things back into degraded
mode.  We also will implicitly do the degraded mode for e.g.
init=/foo/barsh
2010-07-20 23:02:54 -04:00
Ray Strode
227db7b0ff [main] Use plymouth.arg instead of plymouth:arg for kernel cmdline
Plymouth has historically used "plymouth:" to identify arguments destined
for it on the kernel command line.  Most other things seem to the period
instead of colon, so this commit just makes plymouth conform.

For compatibility, we still support the old way.
2010-07-20 22:45:21 -04:00
Ray Strode
6e933285bb [main] drop all the open strstr calls
Our kernel command line processing is rather ad hoc.
This commit tries to clean it up a small amount by
adding functions to hide the strstr details.
2010-07-20 22:27:25 -04:00
Ray Strode
e5380671be [populate-initrd] don't croak when encountering broken symlink
Because of an apparent think-o in the script, if a custom theme
has a broken symlink in it, plymouth-populate-initrd would silently
stop processing files and ship an incomplete set of data files.

This commit changes "break" to "continue" so that broken symlinks
are ignored, which was probably the original intent.
2010-07-13 17:33:39 -04:00
Bruce Jerrick
95bf9eed86 [set-default-theme] Properly quote arguments to basename
It's important to make sure the theme name is properly
quoted when passed to the basename command.  This
is because, if the theme name is empty we want the empty
string returned, not the suffix that would otherwise be
stripped off.

Some discussion here:
https://bugzilla.redhat.com/show_bug.cgi?id=606634
2010-07-06 11:16:43 -04:00
Ray Strode
0e232e2976 [details] detach from event loop when quitting
If the user has the details plugin configured, and the
system does plymouth quit --retain-splash, then their
may be a crash.

This is because the plugin event loop exit handler will called
after the plugin is destroyed.  This commit makes sure
the exit handler is removed before the plugin is freed.
2010-06-30 21:55:59 -04:00
Ray Strode
56e6e7d0b9 [main] try more aggressively to find a terminal
Before we defaulted to tty1, but some systems just
don't have tty1.  Normally, those systems specify
an alternate console on the kernel command line,
but not always.

This commit tries to make things work in those cases
as well.

I'd like to find a more generic way to make this all
work.
2010-06-30 20:47:20 -04:00
Ray Strode
0430e51224 [terminal] Add OPOST to tty attributes
ONLCR apparently requires OPOST to work.

This should prevent weird "stair stepping"
effects when non-plymouth things try to
use the terminal.
2010-06-30 20:18:08 -04:00
Ray Strode
4081bd29fb [terminal] Force enter to output newline
This matches the default unix behavior, and so we're going to be a lot
more robust against our terminal settings getting mucked with.
2010-06-30 19:43:16 -04:00
Ray Strode
3875c30854 [client] Fix watch-keystroke cancellation
If someone calls --ignore-keystroke then
the watch-keystroke command shouldn't get
run and the exit code should be different
than if it does get run.
2010-06-30 16:04:14 -04:00
Ray Strode
6e09dd50ea [viewer] make boot messages show up in monospace
They're sort of designed for it, and look weird in some cases,
otherwise.
2010-06-30 09:12:24 -04:00
Ray Strode
d86ad3fc46 [viewer] add window icon
Before it was showing up as an ugly generic icon.
2010-06-30 09:00:05 -04:00
Ray Strode
efe9f39672 [throbber] fix drawing artifact
The code was using the wrong x and y values, which meant initially
there is an opportunity to draw a frame in the wrong place.
2010-06-17 16:11:42 -04:00
Tero Mononen
26bc6f87c0 [event-loop] Handle more than 8 events at once
epoll_wait was getting passed a pointer to 64 events,
but was only being told to use up to 8 of those events
at a time because it was using sizeof (pointer) for the
argument specifying the number of events instead of the
actual number of events.
2010-06-15 10:15:51 -04:00
Ray Strode
9f25189bc8 [drm] Try to maintain current mode when overridden
plymouth has naïvely been treating the first available mode in
the connector object as the active mode. While this is true
most of the time, it doesn't hold true if the user overrides the
mode on the kernel command line.

This commit changes things to look up the actual active mode, and go
with that, which should help prevent flicker at start up in some cases.

This patch is based heavily on a patch from Forest Bond
<forest@alittletooquiet.net> here:

http://lists.freedesktop.org/archives/plymouth/2010-June/000369.html

and first mentioned in commit abfda7550a
2010-06-13 23:16:48 -04:00
Ray Strode
b5b5f081ba [drm] Make find_controller return the crtc not crtc id
This will give us the ability to look at the currently active
mode and so paves the way toward cleaning up a recently added
FIXME in the code.
2010-06-13 22:45:36 -04:00
Ray Strode
abfda7550a [drm] Store mode of each head as index
Previously, we would store the mode of each head as pointer in
the array of modes on the connector object.  Now we just store
the index into that array.

This is to make it clearer that we don't own the memory
associated with it directly, and that the memory associated with
it is automatically cleaned up when the connector is.

This also helps to highlight a problem mentioned by
Forest Bond <forest@alittletooquiet.net> here:

http://lists.freedesktop.org/archives/plymouth/2010-June/000369.html

Namely, we've been naïvely treating the first available mode in
the connector object as the active mode.  While this is true
most of the time, it doesn't hold true if the user overrides the
mode on the kernel command line.
2010-06-13 22:24:33 -04:00
Charlie Brej
ce884c5ca2 [client] Add ignore-keystroke command
Adds an ignore-keystroke command. This does the same thing as the
ignore-keystroke option, but is migrated to a command. The option still exists
for compatibility.
2010-06-03 15:45:36 +01:00
Ray Strode
74ed81c79c [terminal] Add some debug spew if terminal couldn't be opened 2010-06-02 18:30:12 -04:00
Ray Strode
648745cddb [keyboard] Don't blow an assertion if terminal is unavailable
Right now, we always assume the tty can be reopened when it
gets disconnected.  This isn't always true.  While plymouth
clearly won't function 100% properly without a tty, we shouldn't
blow an assertion.
2010-06-02 18:28:02 -04:00
Ray Strode
d9aa8907f3 [main] Be more forgiving of an absent boot splash
Mandriva has cases where they need to drop to details mode
before /usr is mounted.  /usr has the details splash plugin,
so this causes plymouth to explicitly exit.

This commit makes plymouth cope with that scenario slightly
better.  It takes out the exit(1) call which was clearly bogus,
and also makes parts of the code handle a NULL splash better.
This is not a real fix though.

Ultimately, we should make "details" be built-in as a nice failsafe.
There's no reason we should need to load it off the disk as a plugin.
2010-05-26 13:11:54 -04:00
Ray Strode
63d9e888e8 [docs] Fix up encoding Kristian Høgsberg 2010-05-14 13:55:13 -04:00
Ray Strode
070d2a0a5a [set-default-theme] More fixes to the fallback logic
It still wasn't properly falling back in the event the
configured theme was uninstalled.
2010-05-14 10:56:00 -04:00
Ray Strode
07d5f10f60 [set-default-theme] Add more compat goo
If there's no configured theme installed, return "text"
2010-05-07 15:35:49 -04:00
Ray Strode
8c390bea97 [terminal] Don't stomp over original tty lock settings
We were repetedly saving over the original tty lock settings,
causing the tty to stay locked after boot up.
2010-05-07 14:49:09 -04:00
Ray Strode
2ea21378ef [configure] bump to 0.8.3 2010-05-06 13:32:20 -04:00
Ray Strode
e64a8976a5 [two-step] Add optional header and throbber
These are just a few more bits for themes to optionally
make use of.  The throbber gets overlaid with the
progress animation, so they need to be concentric.
The header gets put on top.
2010-05-06 13:04:14 -04:00
Ray Strode
1aaaf1d39d [two-step] Add new ProgressFunction config option
We've historically used a expontial function for boot up,
to make it "feel" faster.  This equation was invented by
Will Woods.

Making progress linear with boot up is also useful though.

This commit makes it configurable.
2010-05-06 12:59:54 -04:00
Ray Strode
4da25e407c [main] Save progress cache file earlier
The cache file record milestones during boot, so we should
write it out:

1) only after the root filesystem is mounted
2) as soon as we're no longer going to get updates about boot
   progress.
2010-05-06 10:57:33 -04:00
Ray Strode
efc9999460 [boot-splash] Force progress to 1.0 when quitting
This potentially allows themes to move their progress
bars to the end before quiting.
2010-05-06 10:54:27 -04:00
Ray Strode
6a7be5ab6a [throbber] Change frame sequencer function
The throbber has a function for determining which frame
to show based on the current time.  This function was:

  ƒrame(t) = number_of_frames ∙ (⅟₂ sin(t) + ⅟₂)

Which basically oscillates between 0 and number_of_frames - 1,
over and over again.  There are two problems with this function;
  - after it runs through all the frames in order, it then procedes
    to run through them backward.
  - This function also starts in the middle of the set of throbber
    frames.

These problems don't matter for spinfinity, but will look wrong for most
other themes.

The new function is this:

  ƒrame(t) = number_of_frames ∙ (1⁄duration)(t mod duration)

This function solves both problems.  At time 0 it uses frame 0, and
after the last frame it jumps back to the first frame.
2010-05-06 10:04:26 -04:00
Ray Strode
7d6763e4ab [throbber] set is_stopped after stopping
The throbber variable has an is_stopped state
variable that decides whether or not draws happen.

It starts off false, and gets toggled when started.

Unfortunately, it never gets reset to false
after be stopped.  This commit fixes that.
2010-05-06 08:45:41 -04:00
Colin Watson
c859e580a1 Handle NULL boot_buffer
boot_buffer may be NULL if plymouthd failed to attach to the console
session (e.g. if booting without an initramfs so /dev/pts isn't mounted
yet).  Handle this gracefully rather than segfaulting.
2010-05-03 10:00:38 -04:00
Colin Watson
7021306e43 Handle plymouth:splash or plymouth:debug as last argument
If plymouth:splash or plymouth:debug is the last argument in
/proc/cmdline, then it will be terminated with '\n' rather than ' '.
Handle this.
2010-05-03 10:00:38 -04:00
Colin Watson
38f681280a Fix parsing of plymouth:debug=file:
Short-circuit evaluation meant that the path variable was never set if
plymouth:debug=file: was used.  Switch the ordering around to fix this.
2010-05-03 10:00:38 -04:00
Ray Strode
8c7b2de691 [terminal] wait for vt switching to finish on quit
After changing the active vt during start up,
we get a signal when it finishes, because we're in
VT_PROCESS mode, so we don't need to explicitly block
waiting for it to finish.

During the quit path, though, we aren't in VT_PROCESS mode anymore,
won't get any signals, and still need to know that the VT switch
is finished before informing the client that the quit is
finished.

This commit forces ply_terminal_deactivate_vt to block until the
VT switch it initiates finishes.
2010-04-29 13:23:18 -04:00
Ray Strode
ee41b742ad [terminal] Add some debug spew 2010-04-29 12:46:53 -04:00
Frederic Crozat
54a498c82d [splash] export config and policy directories
Export configuration and policy directories used by plymouth.
2010-04-21 15:40:40 +02:00
Frederic Crozat
979aeacb4a [main] do not set state->keyboard twice
state->keyboard is set already in set_keyboard, there is no need to do
the work twice.
2010-04-21 11:48:57 +02:00
Charlie Brej
d737df27ba [script] Remove debugging trace line 2010-04-21 00:09:25 +01:00
Charlie Brej
e9c668c0f2 [script] Allow passing of values from the .plymouth file to the script
An example in the script.plymouth shows a value being set. These values are
then present at the first execution of the script set in the global scope.
2010-04-21 00:02:42 +01:00