linux-modules: Add module-aliases.
* gnu/build/linux-modules.scm (module-aliases): New variable.
This commit is contained in:
parent
c94752ad22
commit
8b2219d847
|
@ -30,6 +30,7 @@
|
||||||
#:use-module (ice-9 rdelim)
|
#:use-module (ice-9 rdelim)
|
||||||
#:export (dot-ko
|
#:export (dot-ko
|
||||||
ensure-dot-ko
|
ensure-dot-ko
|
||||||
|
module-aliases
|
||||||
module-dependencies
|
module-dependencies
|
||||||
recursive-module-dependencies
|
recursive-module-dependencies
|
||||||
modules-loaded
|
modules-loaded
|
||||||
|
@ -95,6 +96,15 @@ contains module names, not actual file names."
|
||||||
(('depends . what)
|
(('depends . what)
|
||||||
(string-tokenize what %not-comma)))))
|
(string-tokenize what %not-comma)))))
|
||||||
|
|
||||||
|
(define (module-aliases file)
|
||||||
|
"Return the list of aliases of module FILE."
|
||||||
|
(let ((info (modinfo-section-contents file)))
|
||||||
|
(filter-map (match-lambda
|
||||||
|
(('alias . value)
|
||||||
|
value)
|
||||||
|
(_ #f))
|
||||||
|
(modinfo-section-contents file))))
|
||||||
|
|
||||||
(define dot-ko
|
(define dot-ko
|
||||||
(cut string-append <> ".ko"))
|
(cut string-append <> ".ko"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue