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();
return STATUS_INSUFFICIENT_RESOURCES;
}
+#if 0
if (!ReadBackupTable)
{
/* If we weren't ask to read backup table,
UpdatedPartitionTable = TRUE;
}
}
+#endif
DriveLayoutEx->PartitionStyle = PARTITION_STYLE_GPT;
/* Translate LBA -> Offset */
}
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;
DriveLayout->PartitionEntry);
}
}
+ else
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ }
}
break;