gpt partitioning: properly delete partition entries.

Previously, deleting a partition was lazy and only changed
the partition type to an invalid UUID, and would still
show up as a partition in many partitioning tools.
This commit is contained in:
Jessica Hamilton 2015-10-08 21:21:37 +00:00
parent 5df5223b4b
commit f052cd0cce

View File

@ -835,6 +835,7 @@ efi_gpt_delete_child(int fd, partition_id partitionID, partition_id childID,
return B_ERROR;
efi_partition_entry& entry = header->EntryAt(entryIndex);
memset(&entry, 0, sizeof(efi_partition_entry));
entry.partition_type = kEmptyGUID;
status_t result = header->WriteEntry(fd, entryIndex);