Author: ion
Date: Tue Feb 20 19:39:31 2007
New Revision: 25859
URL:
http://svn.reactos.org/svn/reactos?rev=25859&view=rev
Log:
- Don't load .SYM in freeldr anymore.
- Fix generation of driver name for symbol load.
Modified:
branches/alex-kd-branch/reactos/boot/freeldr/freeldr/reactos/reactos.c
branches/alex-kd-branch/reactos/ntoskrnl/ex/init.c
Modified: branches/alex-kd-branch/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/boot/fre…
==============================================================================
--- branches/alex-kd-branch/reactos/boot/freeldr/freeldr/reactos/reactos.c (original)
+++ branches/alex-kd-branch/reactos/boot/freeldr/freeldr/reactos/reactos.c Tue Feb 20
19:39:31 2007
@@ -158,69 +158,6 @@
/* Update Processbar and return success */
if (!FrLdrBootType) UiDrawProgressBarCenter(nPos, 100, szLoadingMsg);
return TRUE;
-}
-
-static VOID
-FreeldrFreeMem(PVOID Area)
-{
- MmFreeMemory(Area);
-}
-
-static PVOID
-FreeldrAllocMem(ULONG_PTR Size)
-{
- return MmAllocateMemory((ULONG) Size);
-}
-
-static BOOLEAN
-FreeldrReadFile(PVOID FileContext, PVOID Buffer, ULONG Size)
-{
- ULONG BytesRead;
-
- return FsReadFile((PFILE) FileContext, (ULONG) Size, &BytesRead, Buffer)
- && Size == BytesRead;
-}
-
-static BOOLEAN
-FreeldrSeekFile(PVOID FileContext, ULONG_PTR Position)
-{
- FsSetFilePointer((PFILE) FileContext, (ULONG) Position);
- return TRUE;
-}
-
-static BOOLEAN
-LoadKernelSymbols(PCHAR szKernelName, int nPos)
-{
- static ROSSYM_CALLBACKS FreeldrCallbacks =
- {
- FreeldrAllocMem,
- FreeldrFreeMem,
- FreeldrReadFile,
- FreeldrSeekFile
- };
- PFILE FilePointer;
- PROSSYM_INFO RosSymInfo;
- ULONG Size;
- ULONG_PTR Base;
- //return TRUE;
-
- RosSymInit(&FreeldrCallbacks);
-
- FilePointer = FsOpenFile(szKernelName);
- if (FilePointer == NULL)
- {
- return FALSE;
- }
- if (! RosSymCreateFromFile(FilePointer, &RosSymInfo))
- {
- return FALSE;
- }
- Base = FrLdrCreateModule("NTOSKRNL.SYM");
- Size = RosSymGetRawDataLength(RosSymInfo);
- RosSymGetRawData(RosSymInfo, (PVOID)Base);
- FrLdrCloseModule(Base, Size);
- RosSymDelete(RosSymInfo);
- return TRUE;
}
static BOOLEAN
@@ -917,12 +854,6 @@
UiDrawProgressBarCenter(30, 100, szLoadingMsg);
/*
- * Load kernel symbols
- */
- LoadKernelSymbols(szKernelName, 30);
- UiDrawProgressBarCenter(40, 100, szLoadingMsg);
-
- /*
* Load boot drivers
*/
FrLdrLoadBootDrivers(szBootPath, 40);
Modified: branches/alex-kd-branch/reactos/ntoskrnl/ex/init.c
URL:
http://svn.reactos.org/svn/reactos/branches/alex-kd-branch/reactos/ntoskrnl…
==============================================================================
--- branches/alex-kd-branch/reactos/ntoskrnl/ex/init.c (original)
+++ branches/alex-kd-branch/reactos/ntoskrnl/ex/init.c Tue Feb 20 19:39:31 2007
@@ -683,11 +683,12 @@
else
{
/* Copy the name */
- for (Count = 0; Count < Length; Count++, Name++)
+ Count = 0;
+ do
{
/* Copy the character */
- NameBuffer[Count] = (CHAR)*Name;
- }
+ NameBuffer[Count++] = (CHAR)*Name++;
+ } while (Count < Length);
/* Null-terminate */
NameBuffer[Count] = ANSI_NULL;
@@ -704,13 +705,14 @@
{
/* Buffer too small */
OverFlow = TRUE;
+ while (TRUE);
}
else
{
/* Otherwise build the name. HACKED for GCC :( */
sprintf(NameBuffer,
- "%c\\System32\\Drivers\\%S",
- SharedUserData->NtSystemRoot[2],
+ "%S\\System32\\Drivers\\%S",
+ &SharedUserData->NtSystemRoot[2],
LdrEntry->BaseDllName.Buffer);
}
}