mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOSKRNL]
For now, disable broken code in FstubReadPartitionTableEFI(). In its current state, it wrongly assumes backup GPT is broken and thus attempts to fix main GPT (?!). Furthermore, it appears Windows 2K3 doesn't perform such checks, nor such GPT rewritings in FstubReadPartitionTableEFI(). CORE-12261 svn path=/trunk/; revision=73112
This commit is contained in:
parent
cfbf8660bc
commit
ec670d6c25
1 changed files with 8 additions and 0 deletions
|
@ -963,8 +963,12 @@ FstubReadPartitionTableEFI(IN PDISK_INFORMATION Disk,
|
|||
ULONG NumberOfEntries;
|
||||
PEFI_PARTITION_HEADER EfiHeader;
|
||||
EFI_PARTITION_ENTRY PartitionEntry;
|
||||
#if 0
|
||||
BOOLEAN UpdatedPartitionTable = FALSE;
|
||||
ULONGLONG SectorsForPartitions, PartitionEntryLBA;
|
||||
#else
|
||||
ULONGLONG PartitionEntryLBA;
|
||||
#endif
|
||||
PDRIVE_LAYOUT_INFORMATION_EX DriveLayoutEx = NULL;
|
||||
ULONG i, PartitionCount, PartitionIndex, PartitionsPerSector;
|
||||
PAGED_CODE();
|
||||
|
@ -996,6 +1000,7 @@ FstubReadPartitionTableEFI(IN PDISK_INFORMATION Disk,
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (!ReadBackupTable)
|
||||
{
|
||||
/* If we weren't ask to read backup table,
|
||||
|
@ -1015,6 +1020,7 @@ FstubReadPartitionTableEFI(IN PDISK_INFORMATION Disk,
|
|||
UpdatedPartitionTable = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DriveLayoutEx->PartitionStyle = PARTITION_STYLE_GPT;
|
||||
/* Translate LBA -> Offset */
|
||||
|
@ -1083,12 +1089,14 @@ FstubReadPartitionTableEFI(IN PDISK_INFORMATION Disk,
|
|||
}
|
||||
DriveLayoutEx->PartitionCount = PartitionCount;
|
||||
|
||||
#if 0
|
||||
/* If we updated partition table using backup table, rewrite partition table */
|
||||
if (UpdatedPartitionTable)
|
||||
{
|
||||
IoWritePartitionTableEx(Disk->DeviceObject,
|
||||
DriveLayoutEx);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Finally, return read data */
|
||||
*DriveLayout = DriveLayoutEx;
|
||||
|
|
Loading…
Reference in a new issue