stub: make debug logging controllable via smbios11 work in the stub too, not just the boot menu

Follow-up for: 0ce83b8a57
This commit is contained in:
Lennart Poettering
2026-03-20 13:56:44 +00:00
committed by Luca Boccassi
parent 55356a7821
commit dae21304ff
3 changed files with 16 additions and 3 deletions
+4 -3
View File
@@ -88,9 +88,10 @@
<varlistentry>
<term><varname>io.systemd.boot.loglevel=</varname><replaceable>LEVEL</replaceable></term>
<listitem><para>This allows configuration of the log level, and is read by <command>systemd-boot</command>.
For details see
<citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<listitem><para>This allows configuration of the log level, and is read by
<command>systemd-boot</command> and <command>systemd-stub</command>. For details see
<citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
<citerefentry><refentrytitle>systemd-stub</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<xi:include href="version-info.xml" xpointer="v259"/></listitem>
</varlistentry>
+10
View File
@@ -789,6 +789,16 @@
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>io.systemd.boot.loglevel</varname></term>
<listitem><para>If set, the value of this string is used as log level. Valid values (from most to
least critical) are <literal>emerg</literal>, <literal>alert</literal>, <literal>crit</literal>,
<literal>err</literal>, <literal>warning</literal>, <literal>notice</literal>, <literal>info</literal>,
and <literal>debug</literal>.</para>
<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>
</variablelist>
</refsect1>
+2
View File
@@ -1232,6 +1232,8 @@ static EFI_STATUS run(EFI_HANDLE image) {
unsigned profile = 0;
EFI_STATUS err;
log_set_max_level_from_smbios();
err = BS->HandleProtocol(image, MAKE_GUID_PTR(EFI_LOADED_IMAGE_PROTOCOL), (void **) &loaded_image);
if (err != EFI_SUCCESS)
return log_error_status(err, "Error getting a LoadedImageProtocol handle: %m");