[PATCH 1/3] Make sure to clear partitions before destroying a disklabel.

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

 



This becomes important when removing a disklabel from a device
which has a disklabel and partitions but which is not something
we support partitioning (eg: lvm lv). In normal cases the
partitions will already have been removed, but in the case of
an unsupported partitioned device we ignore the partitions when
scanning and so have to remove them this way.
---
 storage/formats/disklabel.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index e5fab94..567d26b 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -229,6 +229,7 @@ class DiskLabel(DeviceFormat):
         if not os.access(self.device, os.W_OK):
             raise DeviceFormatError("device path does not exist")
 
+        self.partedDisk.deleteAllPartitions()
         self.partedDevice.clobber()
         self.commit()
         self.exists = False
-- 
1.6.2.5

_______________________________________________
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