X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fboot%2Fefi%2Fgraphics.c;h=9fbcbc10ba1bbb18003e715f41eb94cb1c5b9a47;hb=a19b0678be6f105d1bb1aae151fcb907ea6e832a;hp=11305b8d06e865905dc20f1d94ba7bfad9b4c8b7;hpb=036a4773ffa1152e4cabd27473450b8cc01e019b;p=elogind.git diff --git a/src/boot/efi/graphics.c b/src/boot/efi/graphics.c index 11305b8d0..9fbcbc10b 100644 --- a/src/boot/efi/graphics.c +++ b/src/boot/efi/graphics.c @@ -321,12 +321,9 @@ EFI_STATUS bmp_to_blt(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *buf, return EFI_SUCCESS; } -EFI_STATUS graphics_splash(EFI_FILE *root_dir, CHAR16 *path, - const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) { +EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background) { EFI_GUID GraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput = NULL; - UINT8 *content; - INTN len; struct bmp_dib *dib; struct bmp_map *map; UINT8 *pixmap; @@ -340,10 +337,6 @@ EFI_STATUS graphics_splash(EFI_FILE *root_dir, CHAR16 *path, if (EFI_ERROR(err)) return err; - len = file_read(root_dir, path, 0, 0, &content); - if (len < 0) - return EFI_LOAD_ERROR; - err = bmp_parse_header(content, len, &dib, &map, &pixmap); if (EFI_ERROR(err)) goto err; @@ -384,6 +377,5 @@ EFI_STATUS graphics_splash(EFI_FILE *root_dir, CHAR16 *path, dib->x, dib->y, 0); err: FreePool(blt); - FreePool(content); return err; }