Use \r\n instead of \n only in Hal/InbvDisplayString. This is needed because, when displayed by the EMS console, only \n would be displayed otherwise, leading to misaligned text.

Part 1/X

svn path=/trunk/; revision=60651
This commit is contained in:
Hermès Bélusca-Maïto 2013-10-13 23:04:13 +00:00
parent 136add67b0
commit 1602b39927
10 changed files with 18 additions and 22 deletions

View file

@ -1483,7 +1483,7 @@ Phase1InitializationDiscard(IN PVOID Context)
else
{
/* Use hard-coded banner message */
Status = RtlStringCbCopyA(EndBuffer, Remaining, "REACTOS (R)\n");
Status = RtlStringCbCopyA(EndBuffer, Remaining, "REACTOS (R)\r\n");
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
@ -1586,7 +1586,7 @@ Phase1InitializationDiscard(IN PVOID Context)
sizeof(InitBuffer->VersionBuffer),
NT_SUCCESS(MsgStatus) ?
(PCHAR)MsgEntry->Text :
"%u System Processor [%u MB Memory] %Z\n",
"%u System Processor [%u MB Memory] %Z\r\n",
KeNumberProcessors,
Size,
&TempString);

View file

@ -208,7 +208,7 @@ IopDisplayLoadingMessage(PUNICODE_STRING ServiceName)
if (!KeLoaderBlock) return;
RtlUpcaseUnicodeString(ServiceName, ServiceName, FALSE);
snprintf(TextBuffer, sizeof(TextBuffer),
"%s%sSystem32\\Drivers\\%wZ%s\n",
"%s%sSystem32\\Drivers\\%wZ%s\r\n",
KeLoaderBlock->ArcBootDeviceName,
KeLoaderBlock->NtBootPathName,
ServiceName,

View file

@ -84,9 +84,7 @@ KdPortInitializeEx(
}
if (ComPortNumber == 0)
{
sprintf(buffer,
"\nKernel Debugger: No COM port found!\n\n");
HalDisplayString(buffer);
HalDisplayString("\r\nKernel Debugger: No COM port found!\r\n\r\n");
return FALSE;
}
}
@ -105,9 +103,7 @@ KdPortInitializeEx(
: PortInformation->BaudRate));
if (!NT_SUCCESS(Status))
{
sprintf(buffer,
"\nKernel Debugger: Serial port not found!\n\n");
HalDisplayString(buffer);
HalDisplayString("\r\nKernel Debugger: Serial port not found!\r\n\r\n");
return FALSE;
}
else
@ -115,7 +111,7 @@ KdPortInitializeEx(
#ifndef NDEBUG
/* Print message to blue screen */
sprintf(buffer,
"\nKernel Debugger: Serial port found: COM%ld (Port 0x%lx) BaudRate %ld\n\n",
"\r\nKernel Debugger: Serial port found: COM%ld (Port 0x%lx) BaudRate %ld\r\n\r\n",
ComPortNumber,
PortInformation->Address,
PortInformation->BaudRate);

View file

@ -247,7 +247,7 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable,
}
else if (BootPhase == 2)
{
HalDisplayString("\n File log debugging enabled\n\n");
HalDisplayString("\r\n File log debugging enabled\r\n\r\n");
}
else if (BootPhase == 3)
{
@ -385,7 +385,7 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable,
}
else if (BootPhase == 2)
{
HalDisplayString("\n Serial debugging enabled\n\n");
HalDisplayString("\r\n Serial debugging enabled\r\n\r\n");
}
}
@ -560,7 +560,7 @@ KdpScreenInit(PKD_DISPATCH_TABLE DispatchTable,
}
else if (BootPhase == 2)
{
HalDisplayString("\n Screen debugging enabled\n\n");
HalDisplayString("\r\n Screen debugging enabled\r\n\r\n");
}
}

View file

@ -109,7 +109,7 @@ KdpServiceDispatcher(ULONG Service,
#endif /* DBG */
default:
DPRINT1("Invalid debug service call!\n");
HalDisplayString("Invalid debug service call!\n");
HalDisplayString("Invalid debug service call!\r\n");
break;
}

View file

@ -60,7 +60,7 @@ KdpBochsInit(PKD_DISPATCH_TABLE DispatchTable,
}
else if (BootPhase == 2)
{
HalDisplayString("\n Bochs debugging enabled\n\n");
HalDisplayString("\r\n Bochs debugging enabled\r\n\r\n");
}
}

View file

@ -1578,12 +1578,12 @@ KdpGdbStubInit(PKD_DISPATCH_TABLE WrapperTable, ULONG BootPhase)
GspDbgThread = NULL;
GspEnumThread = NULL;
HalDisplayString("Waiting for GDB to attach\n");
HalDisplayString("Waiting for GDB to attach\r\n");
DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
}
else if (BootPhase == 2)
{
HalDisplayString("\n GDB debugging enabled\n\n");
HalDisplayString("\r\n GDB debugging enabled\r\n\r\n");
}
}

View file

@ -1685,12 +1685,12 @@ KdpGdbStubInit(PKD_DISPATCH_TABLE WrapperTable,
GspDbgThread = NULL;
GspEnumThread = NULL;
HalDisplayString("Waiting for GDB to attach\n");
HalDisplayString("Waiting for GDB to attach\r\n");
DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
}
else if (BootPhase == 2)
{
HalDisplayString("\n GDB debugging enabled\n\n");
HalDisplayString("\r\n GDB debugging enabled\r\n\r\n");
}
}

View file

@ -614,7 +614,7 @@ KiDumpParameterImages(IN PCHAR Message,
/* Format driver name */
sprintf(Message,
"%s** %12s - Address %p base at %p, DateStamp %08lx\n",
"%s** %12s - Address %p base at %p, DateStamp %08lx\r\n",
FirstRun ? "\r\n*":"*",
AnsiName,
(PVOID)Parameters[i],

View file

@ -54,9 +54,9 @@ PopShutdownHandler(VOID)
else
{
/* Do it in text-mode */
for (i = 0; i < 25; i++) InbvDisplayString("\n");
for (i = 0; i < 25; i++) InbvDisplayString("\r\n");
InbvDisplayString(" ");
InbvDisplayString("The system may be powered off now.\n");
InbvDisplayString("The system may be powered off now.\r\n");
}
/* Hang the system */