[master/rhel7] driverdisk: Ignore extra blkid fields (#1036765)

Brian C. Lane bcl at redhat.com
Mon Feb 24 18:02:26 UTC 2014


blkid output may include fields that we are not interested in. This
makes DeviceInfo accept them but only use the ones we are interested in.

Resolves: rhbz#1036765
---
 dracut/driver-updates | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dracut/driver-updates b/dracut/driver-updates
index ea73981..47b845e 100755
--- a/dracut/driver-updates
+++ b/dracut/driver-updates
@@ -601,11 +601,11 @@ def network_driver(dd_path):
     dd_scan(skip_dds, False)
 
 class DeviceInfo(object):
-    def __init__(self, device=None, label=None, uuid=None, fs_type=None):
-        self.device = device
-        self.label = label
-        self.uuid = uuid
-        self.fs_type = fs_type
+    def __init__(self, **kwargs):
+        self.device = kwargs.get("device", None)
+        self.label = kwargs.get("label", None)
+        self.uuid = kwargs.get("uuid", None)
+        self.fs_type = kwargs.get("fs_type", None)
 
     def __str__(self):
         return "%-10s %-20s %-15s %s" % (self.device or "", self.fs_type or "",
-- 
1.8.5.3



More information about the anaconda-patches mailing list