diff --git a/reactos/boot/freeldr/freeldr/arch/arm/macharm.c b/reactos/boot/freeldr/freeldr/arch/arm/macharm.c index 52eaadfcc73..2dc74fe4dcb 100644 --- a/reactos/boot/freeldr/freeldr/arch/arm/macharm.c +++ b/reactos/boot/freeldr/freeldr/arch/arm/macharm.c @@ -203,7 +203,6 @@ MachInit(IN PCCH CommandLine) // MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; - MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry; // // We can now print to the console diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c index 1087a08a516..007ed197320 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c @@ -440,7 +440,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) SectorSize = (DrivePartition == 0xff ? 2048 : 512); if (DrivePartition != 0xff && DrivePartition != 0) { - if (!MachDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) + if (!DiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) return EINVAL; SectorOffset = PartitionTableEntry.SectorCountBeforePartition; SectorCount = PartitionTableEntry.PartitionSectorCount; @@ -565,7 +565,7 @@ GetHarddiskIdentifier(PCHAR Identifier, /* Add partitions */ i = 1; DiskReportError(FALSE); - while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) + while (DiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c index ee1a9a67be9..f1a72832e15 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machpc.c @@ -47,7 +47,6 @@ PcMachInit(const char *CmdLine) MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount; MachVtbl.GetTime = PcGetTime; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c index 4502eed5609..7eec7965d2e 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -50,7 +50,6 @@ XboxMachInit(const char *CmdLine) MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount; MachVtbl.GetTime = XboxGetTime; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c index f0f7c3a78f3..58a6542104b 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c @@ -141,7 +141,7 @@ static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId) SectorSize = (DrivePartition == 0xff ? 2048 : 512); if (DrivePartition != 0xff && DrivePartition != 0) { - if (!MachDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) + if (!XboxDiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) return EINVAL; SectorOffset = PartitionTableEntry.SectorCountBeforePartition; SectorCount = PartitionTableEntry.PartitionSectorCount; @@ -266,7 +266,7 @@ GetHarddiskIdentifier(PCHAR Identifier, /* Add partitions */ i = 1; DiskReportError(FALSE); - while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) + while (XboxDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) { diff --git a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c index f80d209f21c..8bcb6c3f9b6 100644 --- a/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c +++ b/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c @@ -281,12 +281,6 @@ BOOLEAN PpcDiskReadLogicalSectors( ULONG DriveNumber, ULONGLONG SectorNumber, return rlen > 0; } -BOOLEAN PpcDiskGetPartitionEntry( ULONG DriveNumber, ULONG PartitionNumber, - PPARTITION_TABLE_ENTRY PartitionTableEntry ) { - printf("GetPartitionEntry(%d,%d)\n", DriveNumber, PartitionNumber); - return FALSE; -} - BOOLEAN PpcDiskGetDriveGeometry( ULONG DriveNumber, PGEOMETRY DriveGeometry ) { printf("GetGeometry(%d)\n", DriveNumber); DriveGeometry->BytesPerSector = 512; @@ -420,44 +414,6 @@ PCONFIGURATION_COMPONENT_DATA PpcHwDetect() { return RootKey; } -BOOLEAN PpcDiskNormalizeSystemPath(char *SystemPath, unsigned Size) { - CHAR BootPath[256]; - ULONG PartitionNumber; - ULONG DriveNumber; - PARTITION_TABLE_ENTRY PartEntry; - char *p; - - if (!DissectArcPath(SystemPath, BootPath, &DriveNumber, &PartitionNumber)) - { - return FALSE; - } - - if (0 != PartitionNumber) - { - return TRUE; - } - - if (! DiskGetActivePartitionEntry(DriveNumber, - &PartEntry, - &PartitionNumber) || - PartitionNumber < 1 || 9 < PartitionNumber) - { - return FALSE; - } - - p = SystemPath; - while ('\0' != *p && 0 != _strnicmp(p, "partition(", 10)) { - p++; - } - p = strchr(p, ')'); - if (NULL == p || '0' != *(p - 1)) { - return FALSE; - } - *(p - 1) = '0' + PartitionNumber; - - return TRUE; -} - /* Compatibility functions that don't do much */ VOID PpcVideoPrepareForReactOS(BOOLEAN Setup) { } @@ -484,10 +440,9 @@ void PpcDefaultMachVtbl() MachVtbl.GetMemoryMap = PpcGetMemoryMap; - MachVtbl.DiskNormalizeSystemPath = PpcDiskNormalizeSystemPath; + MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskGetBootPath = PpcDiskGetBootPath; MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = PpcDiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = PpcDiskGetCacheableBlockCount; diff --git a/reactos/boot/freeldr/freeldr/include/machine.h b/reactos/boot/freeldr/freeldr/include/machine.h index 9ed71df28c7..8201f6672ec 100644 --- a/reactos/boot/freeldr/freeldr/include/machine.h +++ b/reactos/boot/freeldr/freeldr/include/machine.h @@ -65,7 +65,6 @@ typedef struct tagMACHVTBL BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size); BOOLEAN (*DiskNormalizeSystemPath)(char *SystemPath, unsigned Size); BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); - BOOLEAN (*DiskGetPartitionEntry)(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOLEAN (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry); ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber); @@ -99,7 +98,6 @@ MEMORY_DESCRIPTOR* ArcGetMemoryDescriptor(MEMORY_DESCRIPTOR* Current); BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size); BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size); BOOLEAN MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); -BOOLEAN MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOLEAN MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); ULONG MachDiskGetCacheableBlockCount(ULONG DriveNumber); TIMEINFO* ArcGetTime(VOID); @@ -127,7 +125,6 @@ VOID MachPrepareForReactOS(IN BOOLEAN Setup); #define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size)) #define MachDiskNormalizeSystemPath(Path, Size) MachVtbl.DiskNormalizeSystemPath((Path), (Size)) #define MachDiskReadLogicalSectors(Drive, Start, Count, Buf) MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf)) -#define MachDiskGetPartitionEntry(Drive, Part, Entry) MachVtbl.DiskGetPartitionEntry((Drive), (Part), (Entry)) #define MachDiskGetDriveGeometry(Drive, Geom) MachVtbl.DiskGetDriveGeometry((Drive), (Geom)) #define MachDiskGetCacheableBlockCount(Drive) MachVtbl.DiskGetCacheableBlockCount(Drive) #define MachHwDetect() MachVtbl.HwDetect() diff --git a/reactos/boot/freeldr/freeldr/machine.c b/reactos/boot/freeldr/freeldr/machine.c index 5f07d0bb630..26acd7e45a5 100644 --- a/reactos/boot/freeldr/freeldr/machine.c +++ b/reactos/boot/freeldr/freeldr/machine.c @@ -39,7 +39,6 @@ #undef MachDiskGetBootPath #undef MachDiskNormalizeSystemPath #undef MachDiskReadLogicalSectors -#undef MachDiskGetPartitionEntry #undef MachDiskGetDriveGeometry #undef MachDiskGetCacheableBlockCount #undef MachHwDetect @@ -166,12 +165,6 @@ MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG Sect return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); } -BOOLEAN -MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) -{ - return MachVtbl.DiskGetPartitionEntry(DriveNumber, PartitionNumber, PartitionTableEntry); -} - BOOLEAN MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry) {