Re: [PATCH 3/7] Add a function to get paths to loaded modules

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

 



> diff --git a/isys/isys.py b/isys/isys.py
> index 449aded..4fd0b93 100755
> --- a/isys/isys.py
> +++ b/isys/isys.py
> @@ -390,6 +390,16 @@ def ext2HasJournal(device):
>      hasjournal = _isys.e2hasjournal(device);
>      return hasjournal
>  
> +def modulesWithPaths():
> +    mods = []
> +    for modline in open("/proc/modules", "r"):
> +        modName = modline.split(" ", 1)[0]
> +        modInfo = iutil.execWithCapture("modinfo",
> +                ["-F", "filename", modName]).splitlines()
> +        modPaths = [ line.strip() for line in modInfo if line!="" ]
> +        mods.extend(modPaths)
> +    return mods
> +
>  def driveUsesModule(device, modules):
>      """Returns true if a drive is using a prticular module.  Only works
>         for SCSI devices right now."""

Looks okay to me.  Unless anyone has any other objections, I say push
it.

- Chris

_______________________________________________
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