- Properly remove trailing \r\n depending on system configuration. Previous code assumed our wmc tool used target-newlines instead of host-newlines, causing Linux builds to display incorrect boot messages. New code scans the string.

svn path=/trunk/; revision=26764
This commit is contained in:
Alex Ionescu 2007-05-13 20:26:08 +00:00
parent b7c77071ec
commit 03466c9be1

View file

@ -1040,7 +1040,17 @@ ExpInitializeExecutive(IN ULONG Cpu,
{
/* Setup the string */
RtlInitAnsiString(&CsdString, MsgEntry->Text);
CsdString.Length -= 2;
/* Remove trailing newline */
while ((CsdString.Length > 0) &&
((CsdString.Buffer[CsdString.Length] == '\r') ||
(CsdString.Buffer[CsdString.Length] == '\n')))
{
/* Skip the trailing character */
CsdString.Length--;
}
/* Fill the buffer with version information */
Status = RtlStringCbPrintfA(Buffer,
sizeof(Buffer),
"%Z %u%c",
@ -1455,7 +1465,13 @@ Phase1InitializationDiscard(IN PVOID Context)
RtlInitAnsiString(&TempString, MpString);
/* Make sure to remove the \r\n if we actually have a string */
if (TempString.Length >= 2) TempString.Length -= sizeof(2);
while ((TempString.Length > 0) &&
((TempString.Buffer[TempString.Length] == '\r') ||
(TempString.Buffer[TempString.Length] == '\n')))
{
/* Skip the trailing character */
TempString.Length--;
}
/* Get the information string from our resource file */
MsgStatus = RtlFindMessage(NtosEntry->DllBase,