[PATCH] Ignore spurious formatting on partitioned devices.

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

 



If the device contains a valid partition table we do not care what else
udev tells us is there.

Once we move to optionally partitioned devices, this may no longer be
adequate logic for this type of problem.
---
 storage/devicetree.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 318d588..1451623 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1493,6 +1493,14 @@ class DeviceTree(object):
             device.format = formats.DeviceFormat()
             return
 
+        if getattr(device, "partedDisk", None):
+            # Any detected formatting is spurious. Ignore it.
+            # We don't want to try to remove it since that could wipe out
+            # valid data like the partition table or data in existing
+            # partitions.
+            device.format = None
+            return
+
         #
         # now do any special handling required for the device's format
         #
-- 
1.6.0.6

_______________________________________________
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