mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
freeldr:
- make SectionId a ULONG_PTR - same for some Loaderblock members svn path=/branches/ros-amd64-bringup/; revision=34722
This commit is contained in:
@@ -23,7 +23,7 @@ VOID RunLoader(VOID)
|
||||
{
|
||||
CHAR SettingName[80];
|
||||
CHAR SettingValue[80];
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
ULONG OperatingSystemCount;
|
||||
PCSTR *OperatingSystemSectionNames;
|
||||
PCSTR *OperatingSystemDisplayNames;
|
||||
@@ -169,7 +169,7 @@ ULONG GetDefaultOperatingSystem(PCSTR OperatingSystemList[], ULONG OperatingSy
|
||||
{
|
||||
CHAR DefaultOSText[80];
|
||||
PCSTR DefaultOSName;
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
ULONG DefaultOS = 0;
|
||||
ULONG Idx;
|
||||
|
||||
@@ -206,7 +206,7 @@ LONG GetTimeOut(VOID)
|
||||
{
|
||||
CHAR TimeOutText[20];
|
||||
LONG TimeOut;
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
|
||||
TimeOut = CmdLineGetTimeOut();
|
||||
if (0 <= TimeOut)
|
||||
|
||||
@@ -72,14 +72,14 @@ VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG Li
|
||||
|
||||
BOOLEAN IniFileInitialize(VOID);
|
||||
|
||||
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId);
|
||||
ULONG IniGetNumSectionItems(ULONG SectionId);
|
||||
ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex);
|
||||
ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex);
|
||||
BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
|
||||
BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize);
|
||||
BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId);
|
||||
BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue);
|
||||
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId);
|
||||
ULONG IniGetNumSectionItems(ULONG_PTR SectionId);
|
||||
ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex);
|
||||
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex);
|
||||
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
|
||||
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize);
|
||||
BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId);
|
||||
BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue);
|
||||
|
||||
|
||||
#endif // defined __PARSEINI_H
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <freeldr.h>
|
||||
#include <debug.h>
|
||||
|
||||
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
||||
BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId)
|
||||
{
|
||||
PINI_SECTION Section;
|
||||
|
||||
@@ -35,7 +35,7 @@ BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
||||
{
|
||||
// We found it
|
||||
if (SectionId)
|
||||
*SectionId = (ULONG)Section;
|
||||
*SectionId = (ULONG_PTR)Section;
|
||||
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n", SectionId));
|
||||
return TRUE;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ULONG IniGetNumSectionItems(ULONG SectionId)
|
||||
ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
|
||||
{
|
||||
PINI_SECTION Section = (PINI_SECTION)SectionId;
|
||||
|
||||
@@ -59,7 +59,7 @@ ULONG IniGetNumSectionItems(ULONG SectionId)
|
||||
return Section->SectionItemCount;
|
||||
}
|
||||
|
||||
PINI_SECTION_ITEM IniGetSettingByNumber(ULONG SectionId, ULONG SettingNumber)
|
||||
PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber)
|
||||
{
|
||||
PINI_SECTION Section = (PINI_SECTION)SectionId;
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
@@ -83,7 +83,7 @@ PINI_SECTION_ITEM IniGetSettingByNumber(ULONG SectionId, ULONG SettingNumber)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex)
|
||||
ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
|
||||
{
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
|
||||
@@ -96,7 +96,7 @@ ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex)
|
||||
return (strlen(SectionItem->ItemName) + 1);
|
||||
}
|
||||
|
||||
ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex)
|
||||
ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
|
||||
{
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
|
||||
@@ -109,7 +109,7 @@ ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex)
|
||||
return (strlen(SectionItem->ItemValue) + 1);
|
||||
}
|
||||
|
||||
BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
|
||||
BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
|
||||
{
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize));
|
||||
@@ -142,7 +142,7 @@ BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR Setti
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
|
||||
BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize)
|
||||
{
|
||||
PINI_SECTION Section = (PINI_SECTION)SectionId;
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
@@ -174,7 +174,7 @@ BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, U
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId)
|
||||
BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId)
|
||||
{
|
||||
PINI_SECTION Section;
|
||||
|
||||
@@ -202,12 +202,12 @@ BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId)
|
||||
IniFileSectionCount++;
|
||||
InsertHeadList(&IniFileSectionListHead, &Section->ListEntry);
|
||||
|
||||
*SectionId = (ULONG)Section;
|
||||
*SectionId = (ULONG_PTR)Section;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR SettingValue)
|
||||
BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue)
|
||||
{
|
||||
PINI_SECTION Section = (PINI_SECTION)SectionId;
|
||||
PINI_SECTION_ITEM SectionItem;
|
||||
|
||||
@@ -26,8 +26,8 @@ BOOLEAN InitOperatingSystemList(PCSTR **SectionNamesPointer, PCSTR **DisplayName
|
||||
CHAR SettingName[260];
|
||||
CHAR SettingValue[260];
|
||||
ULONG OperatingSystemCount;
|
||||
ULONG SectionId;
|
||||
ULONG OperatingSystemSectionId;
|
||||
ULONG_PTR SectionId;
|
||||
ULONG_PTR OperatingSystemSectionId;
|
||||
ULONG SectionSettingCount;
|
||||
PCHAR *OperatingSystemSectionNames;
|
||||
PCHAR *OperatingSystemDisplayNames;
|
||||
|
||||
@@ -571,7 +571,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
||||
CHAR szKernelName[255];
|
||||
CHAR szFileName[255];
|
||||
CHAR MsgBuffer[256];
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
PIMAGE_NT_HEADERS NtHeader;
|
||||
PVOID LoadBase;
|
||||
ULONG_PTR Base;
|
||||
@@ -596,19 +596,19 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
||||
* Setup multiboot information structure
|
||||
*/
|
||||
LoaderBlock.CommandLine = reactos_kernel_cmdline;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
|
||||
LoaderBlock.ModsCount = 0;
|
||||
LoaderBlock.ModsAddr = reactos_modules;
|
||||
LoaderBlock.DrivesAddr = reactos_arc_disk_info;
|
||||
LoaderBlock.RdAddr = (ULONG)gRamDiskBase;
|
||||
LoaderBlock.RdAddr = (ULONG_PTR)gRamDiskBase;
|
||||
LoaderBlock.RdLength = gRamDiskSize;
|
||||
LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
|
||||
LoaderBlock.MmapLength = (SIZE_T)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
|
||||
if (LoaderBlock.MmapLength)
|
||||
{
|
||||
ULONG i;
|
||||
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
|
||||
LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
|
||||
LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
|
||||
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24
|
||||
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
|
||||
{
|
||||
@@ -698,7 +698,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
||||
/*
|
||||
* Detect hardware
|
||||
*/
|
||||
LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
|
||||
LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
|
||||
UiDrawProgressBarCenter(5, 100, szLoadingMsg);
|
||||
|
||||
LoaderBlock.DrivesCount = reactos_disk_count;
|
||||
|
||||
@@ -183,20 +183,20 @@ VOID RunLoader(VOID)
|
||||
|
||||
/* Setup multiboot information structure */
|
||||
LoaderBlock.CommandLine = reactos_kernel_cmdline;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
|
||||
LoaderBlock.ModsCount = 0;
|
||||
LoaderBlock.ModsAddr = reactos_modules;
|
||||
LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
|
||||
if (LoaderBlock.MmapLength)
|
||||
{
|
||||
#ifdef _M_IX86
|
||||
#if defined (_M_IX86) || defined (_M_AMD64)
|
||||
ULONG i;
|
||||
#endif
|
||||
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
|
||||
LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
|
||||
LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
|
||||
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24
|
||||
#ifdef _M_IX86
|
||||
#if defined (_M_IX86) || defined (_M_AMD64)
|
||||
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
|
||||
{
|
||||
if (BiosMemoryUsable == reactos_memory_map[i].type &&
|
||||
@@ -231,7 +231,7 @@ VOID RunLoader(VOID)
|
||||
|
||||
/* Detect hardware */
|
||||
UiDrawStatusText("Detecting hardware...");
|
||||
LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
|
||||
LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
|
||||
UiDrawStatusText("");
|
||||
|
||||
/* set boot device */
|
||||
|
||||
@@ -80,7 +80,7 @@ BOOLEAN UiInitialize(BOOLEAN ShowGui)
|
||||
{
|
||||
VIDEODISPLAYMODE UiDisplayMode; // Tells us if we are in text or graphics mode
|
||||
BOOLEAN UiMinimal = FALSE; // Tells us if we should use a minimal console-like UI
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
CHAR DisplayModeText[260];
|
||||
CHAR SettingText[260];
|
||||
ULONG Depth;
|
||||
@@ -408,7 +408,7 @@ VOID UiShowMessageBoxesInSection(PCSTR SectionName)
|
||||
CHAR SettingValue[80];
|
||||
PCHAR MessageBoxText;
|
||||
ULONG MessageBoxTextSize;
|
||||
ULONG SectionId;
|
||||
ULONG_PTR SectionId;
|
||||
|
||||
if (!IniOpenSection(SectionName, &SectionId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user