9e2483ab62
LFCR results in unwanted blank lines being added on serial output. CRLF is what UEFI actually uses. Also fix unneeded CR added to Print() optput in tcc.c. These fixes are needed to to use these application for build time tests. Signed-off-by: Pete Batard <pete@akeo.ie>
28 lines
554 B
C
28 lines
554 B
C
#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!\r\n");
|
|
uefi_call_wrapper(conout->OutputString, 2, conout, a2u("Hello World!\r\n"));
|
|
|
|
return EFI_SUCCESS;
|
|
}
|