]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
stub: Remove unused function parameter
authorJan Janssen <medhefgo@web.de>
Thu, 29 Sep 2022 07:09:52 +0000 (09:09 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 29 Sep 2022 08:30:37 +0000 (10:30 +0200)
src/boot/efi/splash.c
src/boot/efi/splash.h
src/boot/efi/stub.c

index 1f805cf9834005c0b1716dedb87bbed09088d474..5bc1084e6265db2da64db7085b6dd89ca90c1148 100644 (file)
@@ -254,8 +254,8 @@ static EFI_STATUS bmp_to_blt(
         return EFI_SUCCESS;
 }
 
-EFI_STATUS graphics_splash(const uint8_t *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) {
-        EFI_GRAPHICS_OUTPUT_BLT_PIXEL pixel = {};
+EFI_STATUS graphics_splash(const uint8_t *content, UINTN len) {
+        EFI_GRAPHICS_OUTPUT_BLT_PIXEL background = {};
         EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput = NULL;
         struct bmp_dib *dib;
         struct bmp_map *map;
@@ -270,13 +270,10 @@ EFI_STATUS graphics_splash(const uint8_t *content, UINTN len, const EFI_GRAPHICS
 
         assert(content);
 
-        if (!background) {
-                if (strcaseeq16(u"Apple", ST->FirmwareVendor)) {
-                        pixel.Red = 0xc0;
-                        pixel.Green = 0xc0;
-                        pixel.Blue = 0xc0;
-                }
-                background = &pixel;
+        if (strcaseeq16(ST->FirmwareVendor, u"Apple")) {
+                background.Red = 0xc0;
+                background.Green = 0xc0;
+                background.Blue = 0xc0;
         }
 
         err = BS->LocateProtocol(&GraphicsOutputProtocol, NULL, (void **) &GraphicsOutput);
@@ -293,7 +290,7 @@ EFI_STATUS graphics_splash(const uint8_t *content, UINTN len, const EFI_GRAPHICS
                 y_pos = (GraphicsOutput->Mode->Info->VerticalResolution - dib->y) / 2;
 
         err = GraphicsOutput->Blt(
-                        GraphicsOutput, (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *)background,
+                        GraphicsOutput, &background,
                         EfiBltVideoFill, 0, 0, 0, 0,
                         GraphicsOutput->Mode->Info->HorizontalResolution,
                         GraphicsOutput->Mode->Info->VerticalResolution, 0);
index ec36451ff086e043864b37001258ed9fe5992216..2e502e5c36aa77fbc429d5eb42ad3e5264ebab98 100644 (file)
@@ -3,4 +3,4 @@
 
 #include <efi.h>
 
-EFI_STATUS graphics_splash(const uint8_t *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background);
+EFI_STATUS graphics_splash(const uint8_t *content, UINTN len);
index 2c68ee925f5f5a52e44dc69838cd334aba99112f..b4395c2307e5c250918a06dbe462db5d855ae4c7 100644 (file)
@@ -210,7 +210,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
                 (void) efivar_set_uint_string(LOADER_GUID, L"StubPcrKernelImage", TPM_PCR_INDEX_KERNEL_IMAGE, 0);
 
         /* Show splash screen as early as possible */
-        graphics_splash((const uint8_t*) loaded_image->ImageBase + addrs[UNIFIED_SECTION_SPLASH], szs[UNIFIED_SECTION_SPLASH], NULL);
+        graphics_splash((const uint8_t*) loaded_image->ImageBase + addrs[UNIFIED_SECTION_SPLASH], szs[UNIFIED_SECTION_SPLASH]);
 
         if (szs[UNIFIED_SECTION_CMDLINE] > 0) {
                 cmdline = (char *) loaded_image->ImageBase + addrs[UNIFIED_SECTION_CMDLINE];