FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 12-08-2009, 12:46 PM
Martin Sivak
 
Default Uset modinfo -F to get the patch directly, without parsing them out

Ehmm.. and I know about the typos in the commit message... it should read:
Use modinfo -F to get the paths directly, without parsing them out

----- "Martin Sivak" <msivak@redhat.com> wrote:

> ---
> 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org