Remove PpcDiskNormalizeSystemPath(), it was the same as DiskNormalizeSystemPath()
svn path=/trunk/; revision=43271
//
MachVtbl.DiskGetBootPath = DiskGetBootPath;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
- MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
//
// We can now print to the console
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;
/* Add partitions */
i = 1;
DiskReportError(FALSE);
- while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry))
+ while (DiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry))
{
if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED)
{
MachVtbl.DiskGetBootPath = DiskGetBootPath;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
- MachVtbl.DiskGetPartitionEntry = DiskGetPartitionEntry;
MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = PcDiskGetCacheableBlockCount;
MachVtbl.GetTime = PcGetTime;
MachVtbl.DiskGetBootPath = DiskGetBootPath;
MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
- MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry;
MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = XboxDiskGetCacheableBlockCount;
MachVtbl.GetTime = XboxGetTime;
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;
/* Add partitions */
i = 1;
DiskReportError(FALSE);
- while (MachDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry))
+ while (XboxDiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry))
{
if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED)
{
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;
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) {
}
MachVtbl.GetMemoryMap = PpcGetMemoryMap;
- MachVtbl.DiskNormalizeSystemPath = PpcDiskNormalizeSystemPath;
+ MachVtbl.DiskNormalizeSystemPath = DiskNormalizeSystemPath;
MachVtbl.DiskGetBootPath = PpcDiskGetBootPath;
MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
- MachVtbl.DiskGetPartitionEntry = PpcDiskGetPartitionEntry;
MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;
MachVtbl.DiskGetCacheableBlockCount = PpcDiskGetCacheableBlockCount;
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);
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);
#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()
#undef MachDiskGetBootPath
#undef MachDiskNormalizeSystemPath
#undef MachDiskReadLogicalSectors
-#undef MachDiskGetPartitionEntry
#undef MachDiskGetDriveGeometry
#undef MachDiskGetCacheableBlockCount
#undef MachHwDetect
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)
{