From 3d97ec376e57705ac81fb9a06d5fae57e7c36c61 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 17 Dec 2013 00:57:15 +0100 Subject: [PATCH] show unconfigured default and entry-specific splash on 'P' --- src/efi/gummiboot.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c index e1da300..a7a1251 100644 --- a/src/efi/gummiboot.c +++ b/src/efi/gummiboot.c @@ -375,18 +375,19 @@ static VOID print_status(Config *config, EFI_FILE *root_dir, CHAR16 *loaded_imag UINTN size; EFI_STATUS err; - uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); - uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); - - if (config->splash) { + err = EFI_NOT_FOUND; + if (config->splash) err = graphics_splash(root_dir, config->splash); - if (!EFI_ERROR(err)) - console_key_read(&key, TRUE); - + if (EFI_ERROR(err)) + err = graphics_splash(root_dir, L"\\EFI\\gummiboot\\splash.bmp"); + if (!EFI_ERROR(err)) { + console_key_read(&key, TRUE); graphics_mode(FALSE); - uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); } + uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); + uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); + Print(L"gummiboot version: " VERSION "\n"); Print(L"loaded image: %s\n", loaded_image_path); Print(L"UEFI version: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff); @@ -451,6 +452,15 @@ static VOID print_status(Config *config, EFI_FILE *root_dir, CHAR16 *loaded_imag break; entry = config->entries[i]; + + if (entry->splash) { + err = graphics_splash(root_dir, entry->splash); + if (!EFI_ERROR(err)) { + console_key_read(&key, TRUE); + graphics_mode(FALSE); + } + } + Print(L"config entry: %d/%d\n", i+1, config->entry_count); if (entry->file) Print(L"file '%s'\n", entry->file); -- 2.7.4