[PATCH] Do not try to commit diskLabels on non partitionable devices (#576145)

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

 



There is no reason to call partedDisk.commit() when destroying
disklabels. partedDevice.clobber() is sufficient. More over calling
partedDisk.commit() causes issues, as we now recognize disk labels
on non partitionable devices and calling partedDisk.commit() on a non
partitionable device will always fails, as the device node will reject
the partition table reload ioctl.
---
 storage/formats/disklabel.py |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/storage/formats/disklabel.py b/storage/formats/disklabel.py
index 3e78f27..d4a706d 100644
--- a/storage/formats/disklabel.py
+++ b/storage/formats/disklabel.py
@@ -232,11 +232,7 @@ class DiskLabel(DeviceFormat):
         if not os.access(self.device, os.W_OK):
             raise DeviceFormatError("device path does not exist")
 
-        self._partedDisk = parted.freshDisk(device=self.partedDevice,
-                                            ty=self.partedDisk.type)
-        self.commit()
         self.partedDevice.clobber()
-        self.commit()
         self.exists = False
 
     def commit(self):
-- 
1.7.0

_______________________________________________
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