mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
linux-modules: Use normalized module names for 'modprobe.blacklist'.
* gnu/build/linux-modules.scm (normalize-module-name): New procedure. (file-name->module-name): Use it. (module-black-list): Expound docstring.
This commit is contained in:
parent
57a41bfb3c
commit
5c7dd5ac3a
1 changed files with 16 additions and 4 deletions
|
@ -96,10 +96,20 @@ (define (ensure-dot-ko name)
|
|||
name
|
||||
(dot-ko name)))
|
||||
|
||||
(define (normalize-module-name module)
|
||||
"Return the \"canonical\" name for MODULE, replacing hyphens with
|
||||
underscores."
|
||||
;; See 'modname_normalize' in libkmod.
|
||||
(string-map (lambda (chr)
|
||||
(case chr
|
||||
((#\-) #\_)
|
||||
(else chr)))
|
||||
module))
|
||||
|
||||
(define (file-name->module-name file)
|
||||
"Return the module name corresponding to FILE, stripping the trailing '.ko',
|
||||
etc."
|
||||
(basename file ".ko"))
|
||||
"Return the module name corresponding to FILE, stripping the trailing '.ko'
|
||||
and normalizing it."
|
||||
(normalize-module-name (basename file ".ko")))
|
||||
|
||||
(define* (recursive-module-dependencies files
|
||||
#:key (lookup-module dot-ko))
|
||||
|
@ -138,7 +148,9 @@ (define (modules-loaded)
|
|||
(define (module-black-list)
|
||||
"Return the black list of modules that must not be loaded. This black list
|
||||
is specified using 'modprobe.blacklist=MODULE1,MODULE2,...' on the kernel
|
||||
command line; it is honored by libkmod."
|
||||
command line; it is honored by libkmod for users that pass
|
||||
'KMOD_PROBE_APPLY_BLACKLIST', which includes 'modprobe --use-blacklist' and
|
||||
udev."
|
||||
(define parameter
|
||||
"modprobe.blacklist=")
|
||||
|
||||
|
|
Loading…
Reference in a new issue