Author: pschweitzer
Date: Thu Nov 3 21:13:30 2016
New Revision: 73112
URL:
http://svn.reactos.org/svn/reactos?rev=73112&view=rev
Log:
[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
Modified:
trunk/reactos/ntoskrnl/fstub/fstubex.c
Modified: trunk/reactos/ntoskrnl/fstub/fstubex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/fstubex.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] Thu Nov 3 21:13:30 2016
@@ -963,8 +963,12 @@
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 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
+#if 0
if (!ReadBackupTable)
{
/* If we weren't ask to read backup table,
@@ -1015,6 +1020,7 @@
UpdatedPartitionTable = TRUE;
}
}
+#endif
DriveLayoutEx->PartitionStyle = PARTITION_STYLE_GPT;
/* Translate LBA -> Offset */
@@ -1083,12 +1089,14 @@
}
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;