gnu-efi/apps/old_ABI.c
Callum Farmer b23462d47c
Add single option to revert to old ABI
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-04 19:13:32 +01:00

22 lines
527 B
C

#define GNU_EFI_3_0_COMPAT
#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 = u"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(u"Done!\r\n");
return EFI_SUCCESS;
}