Author: hpoussin Date: Sat Oct 3 20:41:10 2009 New Revision: 43271
URL: http://svn.reactos.org/svn/reactos?rev=43271&view=rev Log: [freeldr] Remove MachDiskGetPartitionEntry, and directly use the correct one Remove PpcDiskNormalizeSystemPath(), it was the same as DiskNormalizeSystemPath()
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/machine.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/a... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -203,7 +203,6 @@ // MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; - MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
// // We can now print to the console
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -440,7 +440,7 @@ 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 @@ /* Add partitions */ i = 1; DiskReportError(FALSE); - while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) + while (DiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) {
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machpc.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -47,7 +47,6 @@ MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount; MachVtbl.GetTime = PcGetTime;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/machxbox.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -50,7 +50,6 @@ MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount; MachVtbl.GetTime = XboxGetTime;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -141,7 +141,7 @@ 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 @@ /* Add partitions */ i = 1; DiskReportError(FALSE); - while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) + while (XboxDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) {
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/p... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -279,12 +279,6 @@
rlen = ofw_read( part_handle, Buffer, (ULONG)(SectorCount * 512) ); 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 ) { @@ -420,44 +414,6 @@ 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 @@
MachVtbl.GetMemoryMap = PpcGetMemoryMap;
- MachVtbl.DiskNormalizeSystemPath = PpcDiskNormalizeSystemPath; + MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath; MachVtbl.DiskGetBootPath = PpcDiskGetBootPath; MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors; - MachVtbl.DiskGetPartitionEntry = PpcDiskGetPartitionEntry; MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry; MachVtbl.DiskGetCacheableBlockCount = PpcDiskGetCacheableBlockCount;
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/includ... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -65,7 +65,6 @@ 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 @@ 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 @@ #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()
Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machin... ============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sat Oct 3 20:41:10 2009 @@ -39,7 +39,6 @@ #undef MachDiskGetBootPath #undef MachDiskNormalizeSystemPath #undef MachDiskReadLogicalSectors -#undef MachDiskGetPartitionEntry #undef MachDiskGetDriveGeometry #undef MachDiskGetCacheableBlockCount #undef MachHwDetect @@ -167,12 +166,6 @@ }
BOOLEAN -MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) -{ - return MachVtbl.DiskGetPartitionEntry(DriveNumber, PartitionNumber, PartitionTableEntry); -} - -BOOLEAN MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry) { return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry);