Re: [PATCH 4/7] Add a method, which returns list of paths to loaded kmods

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

 



On Mon, 2009-12-07 at 10:39 -1000, David Cantrell wrote:

> > +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:") ]
> 
> Why not run 'modinfo -F filename %s' here instead and eliminate the iteration
> over modInfo?

In fairness, I don't think I pointed out that option to him on the
whiteboard session :)

Jon.


_______________________________________________
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