diff options
author | Chris Lumens <clumens@redhat.com> | 2009-05-07 17:39:00 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-05-07 18:59:37 -0400 |
commit | 5fd254ac761d176927bad809363b8b99c2c7245c (patch) | |
tree | 7a392406a968dc0944be0c0301670df2b0642491 /storage | |
parent | b223ee5c2a42b702911f110e4bb8632627396a99 (diff) | |
download | anaconda-5fd254ac761d176927bad809363b8b99c2c7245c.tar.gz anaconda-5fd254ac761d176927bad809363b8b99c2c7245c.tar.xz anaconda-5fd254ac761d176927bad809363b8b99c2c7245c.zip |
Don't clear the first partition on any disk with a Mac disk label (#492154).
Diffstat (limited to 'storage')
-rw-r--r-- | storage/partitioning.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py index a330133da..97316b42b 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -256,6 +256,13 @@ def shouldClear(part, clearPartType, clearPartDisks=None, protectedPartitions=No if clearPartType == CLEARPART_TYPE_NONE: return False + # Never clear the special first partition on a Mac disk label, as that + # holds the partition table itself. + if part.disk.partedDisk.type == "mac" and \ + part.partedPartition.number == 1 and \ + part.partedPartition.name == "Apple": + return False + # If we got a list of disks to clear, make sure this one's on it if clearPartDisks and part.disk.name not in clearPartDisks: return False |