If code calls ply_label_get_width without ply_label_show or some other
call that forces the dimensions to be computed first, then the returned
width will be wrong.
This commit makes the freetype plugin look more like the pango plugin
where the size will computed on demand when querying the width, if
necessary.
If a file is a symlink, we usually want to follow it, so
testing the symlink itself, is less than optimal.
This commit switches to lstat instead of stat.
pango will give a height that's several orders of magnitude too
big sometimes when the width is -1.
This commit checks for -1, explicitly measures the width first, and
remeasures with that width passed in to compute the height.
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