linux-modules: Add 'current-kernel-directory'.
* gnu/build/linux-modules.scm (current-kernel-directory): New procedure. (current-alias-file): Use it.
This commit is contained in:
parent
248db51c7e
commit
a57df67b59
|
@ -357,12 +357,15 @@ and each module is a module name like \"snd_hda_intel\"."
|
||||||
(() ;empty line
|
(() ;empty line
|
||||||
(loop aliases)))))))
|
(loop aliases)))))))
|
||||||
|
|
||||||
(define (current-alias-file)
|
(define (current-kernel-directory)
|
||||||
"Return the absolute file name of the default 'modules.alias' file."
|
"Return the directory of the currently running Linux kernel."
|
||||||
(string-append (or (getenv "LINUX_MODULE_DIRECTORY")
|
(string-append (or (getenv "LINUX_MODULE_DIRECTORY")
|
||||||
"/run/booted-system/kernel/lib/modules")
|
"/run/booted-system/kernel/lib/modules")
|
||||||
"/" (utsname:release (uname))
|
"/" (utsname:release (uname))))
|
||||||
"/" "modules.alias"))
|
|
||||||
|
(define (current-alias-file)
|
||||||
|
"Return the absolute file name of the default 'modules.alias' file."
|
||||||
|
(string-append (current-kernel-directory) "/modules.alias"))
|
||||||
|
|
||||||
(define* (known-module-aliases #:optional (alias-file (current-alias-file)))
|
(define* (known-module-aliases #:optional (alias-file (current-alias-file)))
|
||||||
"Return the list of alias/module pairs read from ALIAS-FILE. Each alias is
|
"Return the list of alias/module pairs read from ALIAS-FILE. Each alias is
|
||||||
|
|
Loading…
Reference in New Issue