From: Lennart Poettering Date: Thu, 26 Mar 2026 22:43:32 +0000 (+0100) Subject: boot: do no show pixel width/height in text mode X-Git-Tag: v261-rc1~707^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208cc69c5005a7c9edec96ca5109c226126106a6;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/boot/boot.c b/src/boot/boot.c index 1be098c287d..4a5102f45c7 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -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;