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

[PATCH 1/2] Give blkid the final word on device format detection. (#593637)



If blkid detected non-disklabel formatting on a device, don't even
look for a disklabel on that device. After all, blkid is supposed
to be the final word on block device formatting detection.
---
 storage/devicetree.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index ec1479e..67c8f65 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1311,6 +1311,10 @@ class DeviceTree(object):
 
     def handleUdevDiskLabelFormat(self, info, device):
         log_method_call(self, device=device.name)
+        if udev_device_get_format(info):
+            log.debug("device %s does not contain a disklabel" % device.name)
+            return
+
         if device.partitioned:
             # this device is already set up
             log.debug("disklabel format on %s already set up" % device.name)
-- 
1.6.6.1


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