[PATCH] Include lv_attr in lvm.lvs() return value.

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

 



Include the lv_attr field in the lvm.lvs() hash table returned.  Needed
to tell if the logical volume is active or not.
---
 storage/devicelibs/lvm.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
index 2196170..e92350b 100644
--- a/storage/devicelibs/lvm.py
+++ b/storage/devicelibs/lvm.py
@@ -319,7 +319,7 @@ def vginfo(vg_name):
 def lvs(vg_name):
     args = ["lvs", "--noheadings", "--nosuffix"] + \
             ["--units", "m"] + \
-            ["-o", "lv_name,lv_uuid,lv_size"] + \
+            ["-o", "lv_name,lv_uuid,lv_size,lv_attr"] + \
             config_args + \
             [vg_name]
 
@@ -332,9 +332,10 @@ def lvs(vg_name):
         line = line.strip()
         if not line:
             continue
-        (name, uuid, size) = line.split()
+        (name, uuid, size, attr) = line.split()
         lvs[name] = {"size": size,
-                     "uuid": uuid}
+                     "uuid": uuid,
+                     "attr": attr}
 
     if not lvs:
         raise LVMError(_("lvs failed for %s" % vg_name))
-- 
1.6.3.3

_______________________________________________
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