diff --git a/xtldr/console.c b/xtldr/console.c index 3578602..3116426 100644 --- a/xtldr/console.c +++ b/xtldr/console.c @@ -102,7 +102,7 @@ BlConsolePrint(IN PUSHORT Format, VA_LIST Arguments; /* Initialise the print contexts */ - ConsolePrintContext.WriteWideCharacter = BlpConsolePrintChar; + ConsolePrintContext.WriteWideCharacter = BlpConsolePutChar; SerialPrintContext.WriteWideCharacter = BlpDebugPutChar; /* Initialise the va_list */ @@ -292,7 +292,7 @@ BlSetCursorPosition(IN ULONGLONG PosX, */ XTCDECL XTSTATUS -BlpConsolePrintChar(IN USHORT Character) +BlpConsolePutChar(IN USHORT Character) { USHORT Buffer[2]; @@ -300,7 +300,7 @@ BlpConsolePrintChar(IN USHORT Character) if(Character == L'\n') { /* Print carriage return ('\r') as well */ - BlpConsolePrintChar(L'\r'); + BlpConsolePutChar(L'\r'); } /* Write character to the screen console */ diff --git a/xtldr/debug.c b/xtldr/debug.c index fabd117..f05750d 100644 --- a/xtldr/debug.c +++ b/xtldr/debug.c @@ -34,7 +34,7 @@ BlDebugPrint(IN PUSHORT Format, if(DEBUG) { /* Initialize the print contexts */ - ConsolePrintContext.WriteWideCharacter = BlpConsolePrintChar; + ConsolePrintContext.WriteWideCharacter = BlpConsolePutChar; SerialPrintContext.WriteWideCharacter = BlpDebugPutChar; /* Initialise the va_list */ @@ -59,6 +59,31 @@ BlDebugPrint(IN PUSHORT Format, } } +/** + * Writes a character to the serial console. + * + * @param Character + * The integer promotion of the character to be written. + * + * @return This routine returns a status code. + * + * @since XT 1.0 + */ +XTCDECL +XTSTATUS +BlpDebugPutChar(IN USHORT Character) +{ + USHORT Buffer[2]; + + /* Write character to the serial console */ + Buffer[0] = Character; + Buffer[1] = 0; + HlComPortPutByte(&BlpStatus.SerialPort, Buffer[0]); + + /* Return success */ + return STATUS_EFI_SUCCESS; +} + /** * This routine initializes the XTLDR debug console. * @@ -243,28 +268,3 @@ BlpInitializeSerialPort(IN ULONG PortNumber, /* Return success */ return STATUS_EFI_SUCCESS; } - -/** - * Writes a character to the serial console. - * - * @param Character - * The integer promotion of the character to be written. - * - * @return This routine returns a status code. - * - * @since XT 1.0 - */ -XTCDECL -XTSTATUS -BlpDebugPutChar(IN USHORT Character) -{ - USHORT Buffer[2]; - - /* Write character to the serial console */ - Buffer[0] = Character; - Buffer[1] = 0; - HlComPortPutByte(&BlpStatus.SerialPort, Buffer[0]); - - /* Return success */ - return STATUS_EFI_SUCCESS; -} diff --git a/xtldr/includes/xtldr.h b/xtldr/includes/xtldr.h index 348603c..5b3a898 100644 --- a/xtldr/includes/xtldr.h +++ b/xtldr/includes/xtldr.h @@ -357,7 +357,7 @@ BlpActivateSerialIOController(); XTCDECL XTSTATUS -BlpConsolePrintChar(IN USHORT Character); +BlpConsolePutChar(IN USHORT Character); XTCDECL XTSTATUS