diff options
Diffstat (limited to 'gnu-efi/gnu-efi-3.0/apps/t.c')
-rw-r--r-- | gnu-efi/gnu-efi-3.0/apps/t.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gnu-efi/gnu-efi-3.0/apps/t.c b/gnu-efi/gnu-efi-3.0/apps/t.c new file mode 100644 index 0000000..c7e3d57 --- /dev/null +++ b/gnu-efi/gnu-efi-3.0/apps/t.c @@ -0,0 +1,27 @@ +#include <efi.h> +#include <efilib.h> + +static CHAR16 * +a2u (char *str) +{ + static CHAR16 mem[2048]; + int i; + + for (i = 0; str[i]; ++i) + mem[i] = (CHAR16) str[i]; + mem[i] = 0; + return mem; +} + +EFI_STATUS +efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab) +{ + SIMPLE_TEXT_OUTPUT_INTERFACE *conout; + + InitializeLib(image_handle, systab); + conout = systab->ConOut; + uefi_call_wrapper(conout->OutputString, 2, conout, (CHAR16 *)L"Hello World!\n\r"); + uefi_call_wrapper(conout->OutputString, 2, conout, a2u("Hello World!\n\r")); + + return EFI_SUCCESS; +} |