Commit graph

1980 commits

Author SHA1 Message Date
Ray Strode
24f78a2754 [throbber] fix incorrect cast 2010-08-22 15:39:08 -04:00
Ray Strode
dcf4417056 [animation] drop unsed variable 2010-08-22 15:37:16 -04:00
Ray Strode
2955b79e3c [animation] fix signedness warnings 2010-08-22 15:36:47 -04:00
Ray Strode
241575f2f7 [throbber] fix signedness warning 2010-08-22 15:35:57 -04:00
Ray Strode
2102644081 [region] clean up bogus whitespace 2010-08-22 15:34:35 -04:00
Ray Strode
f163c1e304 [region] drop unused variables 2010-08-22 15:34:06 -04:00
Ray Strode
0d72e7793b [region] mark do_test static 2010-08-22 15:33:23 -04:00
Ray Strode
29bbcb54b2 [rectangle] Remove bogus whitespace 2010-08-22 15:32:35 -04:00
Ray Strode
9cd114b72c [rectangle] drop unused variable 2010-08-22 15:31:54 -04:00
Ray Strode
01adbeeaa5 [region] Use correct type for loops
We were using ints when dealing with rectangles which
use longs.
2010-08-22 15:30:27 -04:00
Ray Strode
37c82e306c [two-step] Don't crash if throbber is unavailable
While the code took some steps to make the throbber optional,
it missed conditionalizing usage of the throbber in the
exit path.
2010-08-21 17:01:30 -04:00
Ray Strode
3d7f4fe441 [animation] Properly handle zero animation frames
In the event there are no animation frames, we should
fail to load the animation control.
2010-08-21 16:59:04 -04:00
Ray Strode
e30024211b [drm] free stored connector
For most connectors associating monitors with our virtual
'heads', we merely track their ids.  This means we don't have
to bother freeing any client side state at deallocation time.

There's one exception, though.  The main connector, connector0,
we keep an open reference to.  We do this, because it owns the
mode object we use in SetCrtc calls.

This commit ensures that connector0 for each head is properly freed
when that head is deallocated.
2010-08-20 22:10:14 -04:00
Ray Strode
dff1924448 [drm] Allow multiple monitors to share one controller
Some underpowered video cards will have multiple connectors
tied to one controller.  In this case all connectors get
the same "cloned" output automatically.

This commit detects this situation and prevents plymouth from
wastefully trying to allocate several frame buffers.  This
commit also prevents plymouth from constantly trying to switch
between those allocated frame buffers every frame of the animation.
2010-08-19 19:59:46 -04:00
Ray Strode
c9dda9295e [array] Support integer elements
Right now all array elements must be pointer values, or
at least pointer sized values.

This commit allows 32-bit integers as elements as well.
2010-08-19 19:59:37 -04:00
Ray Strode
8fc2569a5c Revert "[drm] Store color depth in buffers"
This reverts commit 4469b8719e.

It was really only needed for commit
625b82f2c3 which we've now
reverted, so revert this one, too.
2010-08-19 13:01:38 -04:00
Ray Strode
244aaa1f4d Revert "[drm] bail if not in 24bpp color mode"
This reverts commit 625b82f2c3.

Even if the kernel fb console is 8bpp, we can (and indeed do)
create our own 24bpp buffer, so the commit wasn't right.
2010-08-19 13:00:28 -04:00
Ray Strode
625b82f2c3 [drm] bail if not in 24bpp color mode
Some server hardware gets initialized into 8bpp mode to
conserve memory.  We can't work in that mode, so we now
check for it and back early.
2010-08-18 16:18:16 -04:00
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