mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
- Isolate the NLS-tables hack so that it's applied only when really needed (freeldr boot process always requires the hack, winldr boot process does not).
svn path=/trunk/; revision=32469
This commit is contained in:
parent
220e309727
commit
04116e8dd6
1 changed files with 25 additions and 19 deletions
|
@ -239,27 +239,33 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED);
|
if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED);
|
||||||
|
|
||||||
/* Copy the codepage data in its new location. */
|
/* Copy the codepage data in its new location. */
|
||||||
//RtlCopyMemory(ExpNlsTableBase,
|
if (NlsTablesEncountered == 1)
|
||||||
// LoaderBlock->NlsData->AnsiCodePageData,
|
{
|
||||||
// ExpNlsTableSize);
|
/* Ntldr-way boot process */
|
||||||
|
RtlCopyMemory(ExpNlsTableBase,
|
||||||
|
LoaderBlock->NlsData->AnsiCodePageData,
|
||||||
|
ExpNlsTableSize);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* In NT, the memory blocks are contiguous, but in ReactOS they aren't,
|
||||||
|
* so unless someone fixes FreeLdr, we'll have to use this icky hack.
|
||||||
|
*/
|
||||||
|
RtlCopyMemory(ExpNlsTableBase,
|
||||||
|
LoaderBlock->NlsData->AnsiCodePageData,
|
||||||
|
NlsTableSizes[0]);
|
||||||
|
|
||||||
/*
|
RtlCopyMemory((PVOID)((ULONG_PTR)ExpNlsTableBase + NlsTableSizes[0]),
|
||||||
* In NT, the memory blocks are contiguous, but in ReactOS they aren't,
|
LoaderBlock->NlsData->OemCodePageData,
|
||||||
* so unless someone fixes FreeLdr, we'll have to use this icky hack.
|
NlsTableSizes[1]);
|
||||||
*/
|
|
||||||
RtlCopyMemory(ExpNlsTableBase,
|
|
||||||
LoaderBlock->NlsData->AnsiCodePageData,
|
|
||||||
NlsTableSizes[0]);
|
|
||||||
|
|
||||||
RtlCopyMemory((PVOID)((ULONG_PTR)ExpNlsTableBase + NlsTableSizes[0]),
|
RtlCopyMemory((PVOID)((ULONG_PTR)ExpNlsTableBase + NlsTableSizes[0] +
|
||||||
LoaderBlock->NlsData->OemCodePageData,
|
NlsTableSizes[1]),
|
||||||
NlsTableSizes[1]);
|
LoaderBlock->NlsData->UnicodeCodePageData,
|
||||||
|
NlsTableSizes[2]);
|
||||||
RtlCopyMemory((PVOID)((ULONG_PTR)ExpNlsTableBase + NlsTableSizes[0] +
|
/* End of Hack */
|
||||||
NlsTableSizes[1]),
|
}
|
||||||
LoaderBlock->NlsData->UnicodeCodePageData,
|
|
||||||
NlsTableSizes[2]);
|
|
||||||
/* End of Hack */
|
|
||||||
|
|
||||||
/* Initialize and reset the NLS TAbles */
|
/* Initialize and reset the NLS TAbles */
|
||||||
RtlInitNlsTables((PVOID)((ULONG_PTR)ExpNlsTableBase +
|
RtlInitNlsTables((PVOID)((ULONG_PTR)ExpNlsTableBase +
|
||||||
|
|
Loading…
Reference in a new issue