[DISKPART] Prevent EFI- and MSR-Partitions from accidental deletion

This commit is contained in:
Eric Kohl
2025-12-15 20:11:59 +01:00
parent bf8741d208
commit 182715ed50
+4 -3
View File
@@ -173,13 +173,14 @@ DeleteGptPartition(
List->SystemPartition = NULL;
}
#endif
#if 0
if ((bOverride == FALSE) && (IsKnownPartition(CurrentPartition) == FALSE))
if ((bOverride == FALSE) &&
((memcmp(&CurrentPartition->Gpt.PartitionType, &PARTITION_SYSTEM_GUID, sizeof(GUID)) == 0) ||
(memcmp(&CurrentPartition->Gpt.PartitionType, &PARTITION_MSFT_RESERVED_GUID, sizeof(GUID)) == 0)))
{
ConResPuts(StdOut, IDS_DELETE_PARTITION_FAIL);
return;
}
#endif
#ifdef DUMP_PARTITION_LIST
DumpPartitionList(CurrentDisk);