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

[PATCH 4/6] Uset modinfo -F to get the patch directly, without parsing them out



---
 isys/isys.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/isys/isys.py b/isys/isys.py
index 94ce039..551887d 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -397,10 +397,8 @@ def modulesWithPaths():
     mods = []
     for modline in open("/proc/modules", "r"):
         modName, _ = modline.split(" ", 1)
-        modInfo = os.popen("modinfo '%s'" % (modName,)).readlines()
-        modPaths = [ line[9:].strip()
-            for line in modInfo
-            if line.startswith("filename:") ]
+        modInfo = os.popen("modinfo -F filename '%s'" % (modName,)).readlines()
+        modPaths = [ line.strip() for line in modInfo if line!="" ]
         mods.extend(modPaths)
     return mods
 
-- 
1.6.4.4


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