git: 3cc3c1eb7961 - main - Skip EFI framebuffer information if there is none
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Feb 2023 01:24:16 UTC
The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3c1eb7961cf93306e0a0f79f3e2309f5b7011 commit 3cc3c1eb7961cf93306e0a0f79f3e2309f5b7011 Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2023-02-06 01:23:09 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2023-02-06 01:23:09 +0000 Skip EFI framebuffer information if there is none Avoid several lines of useless info if there is no EFI framebuffer Reviewed by: stevek, imp Differential Revision: https://reviews.freebsd.org/D38393 --- stand/efi/loader/bootinfo.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 01f7506710bf..939f2cf4c3fe 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -194,16 +194,19 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) efifb.fb_mask_blue = gfx_state.tg_fb.fb_mask_blue; efifb.fb_mask_reserved = gfx_state.tg_fb.fb_mask_reserved; - printf("EFI framebuffer information:\n"); - printf("addr, size 0x%jx, 0x%jx\n", efifb.fb_addr, efifb.fb_size); - printf("dimensions %d x %d\n", efifb.fb_width, efifb.fb_height); - printf("stride %d\n", efifb.fb_stride); - printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", - efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, - efifb.fb_mask_reserved); - - if (efifb.fb_addr != 0) + if (efifb.fb_addr != 0) { + printf("EFI framebuffer information:\n"); + printf("addr, size 0x%jx, 0x%jx\n", + efifb.fb_addr, efifb.fb_size); + printf("dimensions %d x %d\n", + efifb.fb_width, efifb.fb_height); + printf("stride %d\n", efifb.fb_stride); + printf("masks 0x%08x, 0x%08x, 0x%08x, 0x%08x\n", + efifb.fb_mask_red, efifb.fb_mask_green, efifb.fb_mask_blue, + efifb.fb_mask_reserved); + file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb); + } #endif do_vmap = true;