Re: [PATCH] Don't clear the first partition on any disk with a Mac disk label (#492154).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-05-07 at 17:39 -0400, Chris Lumens wrote:
> ---
>  storage/partitioning.py |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)

Ack.

> 
> diff --git a/storage/partitioning.py b/storage/partitioning.py
> index c478be6..6fa6904 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux