gnu-efi/apps/old_ABI.c
Callum Farmer 39681d7a0f
Add test for old ABIs of ReallocatePool and CopyMem
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-05-20 12:15:20 +01:00

23 lines
575 B
C

#define GNU_EFI_USE_REALLOCATEPOOL_ABI 0
#define GNU_EFI_USE_COPYMEM_ABI 0
#include <efi.h>
#include <efilib.h>
EFI_STATUS
efi_main (EFI_HANDLE image EFI_UNUSED, EFI_SYSTEM_TABLE *systab EFI_UNUSED)
{
CHAR16 *Dest = 0;
EFI_UNUSED CHAR16 *Copy = 0;
UINTN test_str_size = 0;
CONST CHAR16 *test_str = L"Hello World!";
test_str_size = StrSize(test_str);
Dest = AllocatePool(test_str_size);
CopyMem(Dest, test_str, test_str_size);
Copy = ReallocatePool(Dest, test_str_size, test_str_size+10);
Print(L"Done!\r\n");
return EFI_SUCCESS;
}