mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
- 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:
parent
b7c77071ec
commit
03466c9be1
1 changed files with 18 additions and 2 deletions
|
@ -1040,7 +1040,17 @@ ExpInitializeExecutive(IN ULONG Cpu,
|
||||||
{
|
{
|
||||||
/* Setup the string */
|
/* Setup the string */
|
||||||
RtlInitAnsiString(&CsdString, MsgEntry->Text);
|
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,
|
Status = RtlStringCbPrintfA(Buffer,
|
||||||
sizeof(Buffer),
|
sizeof(Buffer),
|
||||||
"%Z %u%c",
|
"%Z %u%c",
|
||||||
|
@ -1455,7 +1465,13 @@ Phase1InitializationDiscard(IN PVOID Context)
|
||||||
RtlInitAnsiString(&TempString, MpString);
|
RtlInitAnsiString(&TempString, MpString);
|
||||||
|
|
||||||
/* Make sure to remove the \r\n if we actually have a string */
|
/* 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 */
|
/* Get the information string from our resource file */
|
||||||
MsgStatus = RtlFindMessage(NtosEntry->DllBase,
|
MsgStatus = RtlFindMessage(NtosEntry->DllBase,
|
||||||
|
|
Loading…
Reference in a new issue