diff options
author | Joel Granados Moreno <jgranado@redhat.com> | 2009-05-11 15:29:42 +0200 |
---|---|---|
committer | Joel Granados Moreno <jgranado@redhat.com> | 2009-05-14 19:15:51 +0200 |
commit | d8c4b3491f63ec5c7c6931201637d8d2d6fc3394 (patch) | |
tree | d7bad699378c2b7f36583ab0dfe63465f0edec3b /storage | |
parent | ae229e1e1ee35f617fffdbb8d1e397e3caea44d4 (diff) | |
download | anaconda-d8c4b3491f63ec5c7c6931201637d8d2d6fc3394.tar.gz anaconda-d8c4b3491f63ec5c7c6931201637d8d2d6fc3394.tar.xz anaconda-d8c4b3491f63ec5c7c6931201637d8d2d6fc3394.zip |
Treat the loop labels as devices without a label.(#493219)
The label "loop" in parted means devices that have no partition table but
have a filesystem. Since anaconda does not handle this state, we shall
handle said devices as if they had no label.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/devices.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/storage/devices.py b/storage/devices.py index 8213379ca..29a9d0034 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -712,6 +712,16 @@ class DiskDevice(StorageDevice): else: raise DeviceUserDeniedFormatError("User prefered to not format.") + # When the device has no partition table but it has a FS, it + # will be created with label type loop. Treat the same as if + # the device had no label (cause it really doesn't). + if self.partedDisk.type == "loop": + if initcb is not None and initcb(): + self.partedDisk = parted.freshDisk(device=self.partedDevice, \ + ty = platform.getPlatform(None).diskType) + else: + raise DeviceUserDeniedFormatError("User prefered to not format.") + # We save the actual state of the disk here. Before the first # modification (addPartition or removePartition) to the partition # table we reset self.partedPartition to this state so we can |