Commit graph

1962 commits

Author SHA1 Message Date
Cosimo Cecchi
741b545868 throbber: don't report success when no frames were added
Currently, the throbber will report success when assets are *found* in
the directory. When loading those assets, code will apply more checks to
determine if the assets are meant for the throbber.
In case none of them are, we'll end up not adding any frames, so we
should not report a successful load.
2015-01-05 12:49:50 -05:00
Cosimo Cecchi
f2d378fe1b throbber: don't report successful load when no assets
Currently, the throbber will report a successful load when zero assets
are loaded. Change it so that zero assets do not result in a
successfully loaded throbber.

This is similar to commit 3d7f4fe441 but
for throbber objects instead of animation objects.
2015-01-05 12:48:34 -05:00
Jasper St. Pierre
b0863e73e6 x11: Port to GTK+ 3.0
Port the remaining GTK+ code, the X11 renderer, to GTK+ 3.0.
2015-01-05 12:43:46 -05:00
Jasper St. Pierre
884818222c Remove the old log viewer tool 2015-01-05 12:43:37 -05:00
Jasper St. Pierre
3cce620e75 main: Don't redirect output to /dev/null if we're tracing
Otherwise, our input will mysteriously disappear.
2015-01-05 12:43:09 -05:00
Sjoerd Simons
b97c30a019 utils: Don't create unix sockets non blocking
All the ply_read* functions assume the socket is doing blocking reads,
so opening unix sockets in non-blocking mode doesn't seem the best idea.

Specifically, this was causing ask-password to fail to read the response
at times as it got a -EAGAIN back from read rather then data.
2014-11-17 09:38:14 -05:00
Sjoerd Simons
27fdc7497f script: Add SetRefreshRate function
The script plugin hardcodes an FPS value of 50, which for some themes
and various devices is a bit much.  Add a new function
(Plymouth.SetRefreshRate) which sets the rate at which the
RefreshFunction gets called so each script theme can determine their most
appropriate rate.

https://bugs.freedesktop.org/show_bug.cgi?id=86247
2014-11-13 08:58:22 -05:00
Ray Strode
77b0b0a343 main: fix up spacing in previous commit to match coding style
The previous commit introduced a get_splash_mode_from_mode function
which used the wrong indentation.

This commit fixes up the indentation.
2014-10-22 11:37:34 -04:00
Ray Strode
a9e9165222 main: fix up mode confusion
plymouthd runs in a particular mode "boot" "shutdown" "updates" at any
given time.  Likewise, the plymouth splash object also takes a mode.
These modes map 1-to-1 with each other, and there is more than one place
in the code where we need to get the splash mode from the overall mode.

This commit adds a helper function to perform this translation, and
cleans up the places where the wrong mode type is used or the
translation performed is incomplete.
2014-10-22 11:33:16 -04:00
johnv-valve
b5739c6c99 script support system update events
Add new script function, SetSystemUpdateFunction to allow scripts
to register a callback for system update progress notifications.
2014-10-17 15:19:13 -04:00
Ray Strode
6525ae6017 client: fix incorrectly sized buffer for /proc/cmdline
We assume /proc/cmdline will be no more than 512 bytes (including NUL).
It can actually be 4096 bytes (excluding NUL).

This commit makes sure we allocate enough space for it and its NUL.

This is just like the previous fix for the daemon, but for the client,
now.
2014-10-17 11:19:39 -04:00
Ray Strode
5caf43a2c3 main: fix incorrectly sized buffer for /proc/cmdline
We assume /proc/cmdline will be no more than 512 bytes (including NUL).
It can actually be 4096 bytes (excluding NUL).

This commit makes sure we allocate enough space for it and its NUL.
2014-10-10 16:12:55 -04:00
Ray Strode
530612fb79 main: show splash even when user has init=/bin/sh
At the moment, we don't bother showing the splash
screen if init=/bin/sh since we assume the user
wants to be see the shell prompt.

The problem is, since we don't show a splash screen
we don't handle LUKS in the initrd.

This commit makes us show the splash for the duration
of the initrd but quit on switch root.
2014-10-10 14:29:55 -04:00
Laurent Bigonville
2c65fc7c22 Revert "systemd: add WantedBy snippets"
This reverts commit 7adb50c267.

The .service files are already statically enabled, adding the Install
section and the WantedBy option is useless

Conflicts:
	systemd-units/plymouth-quit-wait.service.in

https://bugs.freedesktop.org/show_bug.cgi?id=80048
2014-07-28 14:56:29 -04:00
Ray Strode
40c2dd36c5 text-step-bar: use correct utf-8 multibyte sequence for ■
For some reason in commit 113526408c
I commited the sequence \x25\x96\xa0 in place of the block character
that was there before.  I don't know where I got \x25 from, but it's
not right (and couldn't even be right since the high order bit isn't
set which is a requirement for the first byte in multi-byte utf-8
sequences).

This commit uses \xe2 instead which I got from doing:

$ echo ■  | xxd
0000000: e296 a00a                                ....
2014-07-28 09:58:49 -04:00
Ray Strode
84eb4381db seat: be a little more forgiving in the case there's no open terminal
We can end up in a situation where a seat object doesn't have a terminal
associated with it.  In that case we shouldn't crash, but continue on
with no input available for that seat.

https://bugs.freedesktop.org/show_bug.cgi?id=80553
2014-07-14 08:04:54 -04:00
Dimitri John Ledkov
a58ae9ba27 configure: bump point release and ABI versions of libraries.
Due to removed interfaces since 0.8.8:
ply_boot_splash_set_keyboard
ply_boot_splash_unset_keyboard
ply_boot_splash_add_pixel_display
ply_boot_splash_remove_pixel_display
ply_boot_splash_add_text_display
ply_boot_splash_remove_text_display

And a bunch of new ones added.
2014-07-11 14:29:45 -04:00
Frederic Crozat
b7fdd62fff libply-splash-core: also monitor for file removal in udev directory
Ensure plymouth detects coldplug completion with recent udev (>= 213).
2014-06-27 14:48:00 +02:00
Frederic Crozat
05cbf14855 .gitignore: ignore generated manpages 2014-06-26 10:42:45 +02:00
Frederic Crozat
d8b7d4dd3c splash: do not process display lists if it is empty or NULL 2014-06-25 14:48:35 +02:00
Frederic Crozat
9c975c6345 libply-splash-core: fix typo in logs 2014-06-23 16:51:08 +02:00
Frederic Crozat
ad75f014b1 splash: remove pixel_display in sprite-lib when notified they are gone 2014-06-19 16:54:12 +02:00
Ray Strode
7091fe54a6 systemd: give plymouth-quit-wait a better description
plymouth-quit-wait.service is a synchronization point that
other services tie into, so they know when boot is finished
and the splash is down.

Unfortunately, in cases where the boot stalls, the last thing
users see is:

Starting Wait for Plymouth Boot Screen to Quit...

and then assume the problem is with the boot splash.

This commit makes the description less finger-pointy.
2014-06-13 11:03:26 -04:00
Frederic Crozat
86e8fa74f1 main: fix typo in debug message 2014-06-12 17:18:59 +02:00
Frederic Crozat
e17f3b9202 device-manager: only call ply_terminal_free
ply_terminal_free will call ply_terminal_close anyway and is guarded
against NULL terminal (ply_terminal_close is not).
2014-06-12 15:01:37 +02:00
Ray Strode
85704145ee Reindent
I don't like the GNU coding style and I'm not sure why I chose it.
This commit changes things over to use 8 space tabs and 'if () {'
style braces.
2014-05-20 15:16:48 -04:00
Ray Strode
5e55bdb33e scripts: change out uncrustify config
I'm going to be updating the coding style of plymouth, so
this is the new uncrustify config.
2014-05-20 15:16:47 -04:00
Ray Strode
e3a0ce8e6c configure: bump to 0.9.0 2014-05-20 13:48:39 -04:00
Ray Strode
113526408c text-step-bar: silence warning about multibyte characters 2014-05-20 13:48:39 -04:00
Ray Strode
4e312bd5a0 boot-server: allow premature client close of socket on update replies
systemd doesn't block waiting for a reply to its update request, since
it would pointlessly slow down boot up.

This commit makes sure we don't bother logging that case.
2014-05-20 13:16:28 -04:00
Ray Strode
60626b10ef event-loop: drop some extraneous debugging messages
These messages may have been useful at one point, but these
days they just add noise to boot up for every service started.
2014-05-20 13:12:21 -04:00
Dimitri John Ledkov
9932f260c4 upstart-bridge: do not generate naked job-name update messages. 2014-05-06 08:19:12 -04:00
Dimitri John Ledkov
6ae0d67011 upstart-bridge: do not generate empty messages 2014-05-06 08:18:48 -04:00
Dimitri John Ledkov
5c487a0b82 upstart-bridge: don't bail on dummy terminals 2014-05-06 08:18:24 -04:00
Dimitri John Ledkov
850d808e47 upstart-bridge: use upstart private socket 2014-05-06 08:17:50 -04:00
Ray Strode
481388968d Revert "Add support for operation log messages"
This reverts commit 52b91176ba.
2014-04-21 11:18:19 -04:00
Ray Strode
aeb9ccbce8 Revert "upstart-bridge: change to use new register operations feature"
This reverts commit e9dced9181.
2014-04-21 11:18:16 -04:00
Pali Rohár
e9dced9181 upstart-bridge: change to use new register operations feature
https://bugs.freedesktop.org/show_bug.cgi?id=77389
2014-04-21 10:38:01 -04:00
Pali Rohár
52b91176ba Add support for operation log messages
This patch adding support for operation log messages and updating upstart
bridge code to use it. This is usefull for verbose log output (e.g daemon
starting, stopping).

Example:

 Register operation ssh:
 $ plymouth register-operation --operation-id=ssh --name='Starting OpenSSH server ssh'

 Set state of operation ssh to wait:
 $ plymouth update --operation-id=ssh --status="wait"
 Details plugin will show: 'Starting OpenSSH server ssh... [wait]'

 Set state of operation ssh to done:
 $ plymouth update --operation-id=ssh --status="done"
 Details plugin will show: 'Starting OpenSSH server ssh... [done]'

 Unregister operation ssh:
 $ plymouth unregister-operation --operation-id=ssh

https://bugs.freedesktop.org/show_bug.cgi?id=77389
2014-04-21 10:37:49 -04:00
Cosimo Cecchi
3db219d89b main: add a --no-boot-log commandline option
For systems that want to keep disk writes at the very minimum.

https://bugs.freedesktop.org/show_bug.cgi?id=76706
2014-03-27 16:15:41 -04:00
Cosimo Cecchi
a55f32a044 main: don't write an empty file when no_boot_log is set
https://bugs.freedesktop.org/show_bug.cgi?id=76706
2014-03-27 16:15:28 -04:00
Ray Strode
dec733032b Revert "systemd: create flag file to notify systemd that plymouth is around"
This reverts commit 8c267e9a3b.

I think this patch was accidentally pushed, since the commit date is
years older than the push date, and it seems to overlap in already
existing pid-file functionality.

If we actually do need this commit we can always add it back of course.
2014-03-27 16:11:50 -04:00
Lennart Poettering
8c267e9a3b systemd: create flag file to notify systemd that plymouth is around 2014-03-20 03:15:26 +01:00
Ray Strode
7e594f7255 seat: make sure to open terminal when adding text displays
If we have a pixel display, the renderer will handle opening the
associated terminal. but if we don't have a pixel display, something
needs to open the terminal.

This commit adds code to do that.
2014-03-06 14:42:16 -05:00
Ray Strode
6c9fddafb1 main: call update_display when splash is shown
we need to call update display any time a splash is shown,
because there may be a pending password request.

The code attempted to do this in show_splash, but did it before
the splash was assigned to running state, so function was a noop.

This commit moves it a little later in code after the splash is
properly assigned.
2014-03-06 10:07:05 -05:00
Ray Strode
5bfb903449 device-manager: be more tolerant of tty active console value
Some kernels mistakenly put tty1 instead of tty0 in the file,
so try to cope with them for maximium compatibility.
2014-03-03 18:02:26 -05:00
Ray Strode
4745c34478 device-manager: ignore udev if only console is serial console
Right now we use the heuristic, "more than one entry in
/sys/class/tty/console/active" to mean "has serial consoles".

We used to use the heuristic "file has more than tty0 in it".
The older heuristic is more accurate because a user may have
console=ttyS0 without console=tty0 on the kernel command line.
2014-03-03 18:02:25 -05:00
Ray Strode
97f02ee959 device-manager: defer /dev/fb compat processing until after coldplug
We never want to use a /dev/fb device if a DRM device will work instead
(since it supports multi-monitor, isn't a legacy interface, etc)

Unfortunately, right now plymouthd notices efifb at early start up,
see's there is no DRM device associated with it and chooses it for
the main display, which causes all sort of problems.

This commit defers using /dev/fb devices until after udev settles.
2014-03-03 17:31:27 -05:00
Ray Strode
f32df0332c device-manager: handle drm hotplug separately from /dev/fb
Right now, we piggyback off fb subsystem events to know whether or
not a drm device is hotplugged (since all drm devices have fb devices
for backward compat).

This commit makes drm and fb processing more independent, so we don't
rely on the compat device being available for drm hotplug to work..
2014-03-03 17:15:14 -05:00
Ray Strode
f57bb3dc1e client: support plymouth.debug on kernel command line
We used to use plymouth:debug to enable debugging in the
plymouth daemon, and changed it to plymouth.debug to be more
consistent with other users of the kernel command line.

We neglected to update the client to support the new format
though.  This commit does that.
2014-02-07 16:40:07 -05:00