boot: do no show pixel width/height in text mode

When running in pure text mode (i.e. serial terminal) the pixel
width/height is zero and makes no sense to report. Suppress it.

(cherry picked from commit 208cc69c50)
This commit is contained in:
Lennart Poettering
2026-03-26 23:43:32 +01:00
committed by Luca Boccassi
parent 9aa214c42a
commit 3a10cafbad

View File

@@ -325,9 +325,13 @@ static void print_status(Config *config, char16_t *loaded_image_path) {
secure_boot_mode_to_string(secure));
printf(" shim: %ls\n", yes_no(shim_loaded()));
printf(" TPM: %ls\n", yes_no(tpm_present()));
printf(" console mode: %i/%" PRIi64 " (%zux%zu @%ux%u)\n",
ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - INT64_C(1),
x_max, y_max, screen_width, screen_height);
printf(" console mode: %i/%" PRIi64 " (%zux%zu",
ST->ConOut->Mode->Mode, ST->ConOut->Mode->MaxMode - INT64_C(1),
x_max, y_max);
if (screen_width > 0 && screen_height > 0)
printf(" @ %ux%u",
screen_width, screen_height);
printf(")\n");
if (!ps_continue())
return;