loader/efi/linux: Return correct size from LoadFile
PATCH 1/1 loader/efi/linux: Return correct size from LoadFile
According to specifications, for BufferSize:
On output with a return code of EFI_SUCCESS, the amount of data transferred to Buffer.
so set *buffer_size correctly.
--- grub-core/loader/efi/linux.c | 1 + 1 file changed, 1 insertion(+)
grub-core/loader/efi/linux.c +1 -0
@@ -363,6 +363,7 @@ grub_efi_initrd_load_file2 (grub_efi_load_file2_t *this,grub_dprintf ("linux" ,"Providing initrd via EFI_LOAD_FILE2_PROTOCOL\n" ); + *buffer_size = initrd_size;if (grub_initrd_load (&initrd_ctx, buffer)) status =GRUB_EFI_DEVICE_ERROR ;
Signature · 7 lines
2.43.0 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 13 lines · Frediano Ziglio via Grub-devel
According to specifications, for BufferSize:
On output with a return code of
EFI_SUCCESS, the amount of data transferred to Buffer.so set
*buffer_sizecorrectly.Signed-off-by Frediano Ziglio <[email protected]>---
Quoted 23 lines
grub-core/loader/efi/linux.c| 1 +1 file changed, 1 insertion(+)grub-core/loader/efi/linux.c +1
-0@@ -363,6 +363,7 @@ grub_efi_initrd_load_file2 (grub_efi_load_file2_t *this,grub_dprintf ("linux" ,"Providing initrd via EFI_LOAD_FILE2_PROTOCOL\n" ); + *buffer_size = initrd_size;if (grub_initrd_load (&initrd_ctx, buffer)) status =GRUB_EFI_DEVICE_ERROR ;Signature · 7 lines
2.43.0 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 1 line · Frediano Ziglio via Grub-devel
According to specifications, for BufferSize:
Which specification? UEFI? For what? EFI_LOAD_FILE2_PROTOCOL.LoadFile()? Please be precise...
Quoted 15 lines
On output with a return code of
EFI_SUCCESS, the amount of data transferred to Buffer.so set
*buffer_sizecorrectly.Signed-off-by Frediano Ziglio <[email protected]>--- grub-core/loader/efi/linux.c | 1 + 1 file changed, 1 insertion(+)grub-core/loader/efi/linux.c +0
-0
grub-core/loader/efi/linux.c grub_efi_initrd_load_file2 (grub_efi_load_file2_t *this, · line 368
Quoted 6 lines
grub-core/loader/efi/linux.c +1
-0@@ -363,6 +363,7 @@ grub_efi_initrd_load_file2 (grub_efi_load_file2_t *this,grub_dprintf ("linux" ,"Providing initrd via EFI_LOAD_FILE2_PROTOCOL\n" ); + *buffer_size = initrd_size;if (grub_initrd_load (&initrd_ctx, buffer)) status =GRUB_EFI_DEVICE_ERROR ;
The code does not align with the commit message and spec...
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel