linux-modules: Add module-aliases.
* gnu/build/linux-modules.scm (module-aliases): New variable.master
parent
c94752ad22
commit
8b2219d847
|
@ -30,6 +30,7 @@
|
|||
#:use-module (ice-9 rdelim)
|
||||
#:export (dot-ko
|
||||
ensure-dot-ko
|
||||
module-aliases
|
||||
module-dependencies
|
||||
recursive-module-dependencies
|
||||
modules-loaded
|
||||
|
@ -95,6 +96,15 @@ contains module names, not actual file names."
|
|||
(('depends . what)
|
||||
(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
|
||||
(cut string-append <> ".ko"))
|
||||
|
||||
|
|
Reference in New Issue