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

Re: [PATCH] Add the partition table partition after initializing (#498602).



On Thu, 2009-05-14 at 12:02 -0400, Chris Lumens wrote:
> We need to make sure the mac partition table partition is in the device tree
> before going any farther in anaconda, or we'll get a traceback when reviewing
> the layout in the UI.

This one looks good.

> ---
>  storage/devicetree.py |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/devicetree.py b/storage/devicetree.py
> index 3837b45..5b6d200 100644
> --- a/storage/devicetree.py
> +++ b/storage/devicetree.py
> @@ -1102,6 +1102,15 @@ class DeviceTree(object):
>              return
>  
>          self._addDevice(device)
> +
> +        # If this is a mac-formatted disk we just initialized, make sure the
> +        # partition table partition gets added to the device tree.
> +        if device.partedDisk.type == "mac" and len(device.partedDisk.partitions) == 1:
> +            name = device.partedDisk.partitions[0].getDeviceNodeName()
> +            if not self.getDeviceByName(name):
> +                partDevice = PartitionDevice(name, exists=True, parents=[device])
> +                self._addDevice(partDevice)
> +
>          return device
>  
>      def addUdevOpticalDevice(self, info):


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