mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[NTOS:FSTUB/IO] Unhardcode some values
This commit is contained in:
@@ -278,8 +278,8 @@ HalpQueryPartitionType(
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* Now, evaluate the partition to the 4 in the input layout */
|
||||
for (i = 0; i < 4; ++i)
|
||||
/* Now, evaluate the partition to those in the input layout */
|
||||
for (i = 0; i < NUM_PARTITION_TABLE_ENTRIES; ++i)
|
||||
{
|
||||
/* If we find a partition matching */
|
||||
if (LayoutInfo->PartitionEntry[i].StartingOffset.QuadPart == PartitionInfo.StartingOffset.QuadPart)
|
||||
|
||||
@@ -564,7 +564,7 @@ FstubDbgPrintDriveLayoutEx(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout)
|
||||
switch (DriveLayout->PartitionStyle)
|
||||
{
|
||||
case PARTITION_STYLE_MBR:
|
||||
if (DriveLayout->PartitionCount % 4 != 0)
|
||||
if (DriveLayout->PartitionCount % NUM_PARTITION_TABLE_ENTRIES != 0)
|
||||
{
|
||||
DPRINT("Warning: Partition count isn't a 4-factor: %lu!\n", DriveLayout->PartitionCount);
|
||||
}
|
||||
|
||||
@@ -628,7 +628,7 @@ IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||
|
||||
/* Check MBR type against EZ Drive type */
|
||||
StartingOffset.QuadPart = 0;
|
||||
HalExamineMBR(DeviceObject, DiskGeometry.BytesPerSector, 0x55, &Data);
|
||||
HalExamineMBR(DeviceObject, DiskGeometry.BytesPerSector, PARTITION_EZDRIVE, &Data);
|
||||
if (Data)
|
||||
{
|
||||
/* If MBR is of the EZ Drive type, we'll read after it */
|
||||
|
||||
Reference in New Issue
Block a user