There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.
This commit runs through them, and does a few other style
cleanups on the way.
There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.
This commit runs through them, and does a few other style
cleanups on the way.
There are still a number of places in the code where a console
viewer is expected, when it's totally possible that there won't
be one.
This commit runs through them, and does a few other style
cleanups on the way.
Right now we divide by zero if the font metrics can't be determined
and tank.
This commit attempts to detect the situation and fall back to using
kernel fb console in that case.
Right now we catch the two big types of crashes:
1. Segmentation fault
2. Assertion failure
But we don't catch another common type, "Divide by zero"
This commit fixes that.
Since plymouth can crash before the root filesystem is mounted,
and since plymouth can prevent boot from proceeding, coredumpctl
isn't always a viable option for getting backtraces.
This commit changes the crash handler to output backtrace
information to assist when coredumpctl can't.
The freetype plugin was calling printf instead of ply-trace when
a font failed to load. Also, it didnt list the failure reason.
This commit fixes things up a bit.
The splash plugins don't create a console viewer if
`plymouth.prefer-fbcon` is on the kernel command line, but expect it
to be not NULL regardless.
This commit corrects that misconception.
If there's no renderers installed there's no point in continuing to
listen for DRM events and trying to load the drm plugin.
This commit just forces text mode right away in that case.
The first line here checked for the wrong variable and is a dupe
from two lines earlier anyway, and the second line isn't guarded
at all, which seems to cause the weird failure we've been seeing
in openQA testing.
Also add a couple more existence checks for the same variables
later.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Some minimal installs won't have fontconfig or xkb. In those cases,
the script should continue to work even if the initramfs will be
less featureful.
This commit fixes that.
If we have an error during early input device initialization we
can blow assertion because we may try to cleave it from the event
loop it is not yet attached to.
This commit fixes that.
There's currently an out of bounds write when copying dmesg to to
the boot buffer.
This is because there's a newline and a terminating NUL and only
one of the two was being accounted for.
This commit fixes the problem by dropping strcat/strcpy and using
printf style functions instead.
Spotted by Ilya K.
The heuristic to check whether or not we're inside of a git checkout
or a tarball isn't working properly.
This commit changes it to use git rev-parse --is-inside-git-dir which
is pretty specifically designed for this use case.
Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/232
It seems like there's a memory leak with the keymap icon text if
there isn't a hit.
This commit fixes that, and renames some of the variables to make
it a little clearer what's going on
commit 42d07913a0 made the pango plugin
NULL safe but the same problem exists in the freetype plugin.
This commit makes things NULL safe a layer higher.
Recent changes to the freetype plugin made it quite buggy. There
was an infinite loop bug, and also a failure in metrics handling.
There's also a number of outstanding issues:
1. Kerning is not properly applied
2. hidpi displays don't render correctly
Rather than try to tackle all of these problems in a peicemeal way,
this commit substantially reworks the code.
It introduces a ply_freetype_unit_t type for more clearly managing
the fixed point math freetype requires. This type relies on less
than well defined compiler behavior, however, so it may cause issues
down the road.
It consolidates measuring and drawing code to one function, since in
both cases, the same computation needs to happen, and they had
slightly divergent implementations before.
It consolidates font loading code, so we don't end up with two
different font face loading routines, with different dpi values.
It also changes the names of some variables to be clearer in my
mind (like changing the loaded glyph to the name "glyph" instead
of the name "slot")
The splash plugins currently call
ply_console_viewer_print (... NULL);
if no prompt message is specified... This leads to crash.
Rather than fixing all the splash plugins, this commit just makes
a NULL format be a noop.
At the moment the splash plugins have a lot of leeway when
updates can go to the screen. They can pause and unpause
updates by themselves, and draw at any point.
This rope has a little too much slack, it's actually kind
of complicated for the splash plugins to manage drawing
when they have more than one moving part.
For instance, a spinner animation may be drawing autonomously
from the splash plugin itself. To avoid flicker, everything
needs to be synchronized.
This commit adds that synchronization a layer higher than
the plugins themselves, in ply-boot-splash. It accumulates
drawing updates continuously without doing any drawing, until
a given deadline, then flushes the updates out all at once.
This reverts commit 815d3c72e2.
This idea of pausing and unpausing updates at a given framerate is good,
but doing it at the ply-pixel-display level causes a proble with
monitor hotplug.