Message ID | 20221216221534.14500-1-marius@gnu.org |
---|---|
State | New |
Headers | show |
Series | VM-optimized Linux-Libre variant | expand |
Marius Bakke 写道: > + (when (file-exists? > "/sys/module/firmware_class/parameters/path") > + (call-with-output-file > "/sys/module/firmware_class/parameters/path" LGTM (Let-binding Gets This Merged). Kind regards, T G-R
Tobias Geerinckx-Rice <me@tobias.gr> skriver: > Marius Bakke 写道: >> + (when (file-exists? >> "/sys/module/firmware_class/parameters/path") >> + (call-with-output-file >> "/sys/module/firmware_class/parameters/path" > > LGTM (Let-binding Gets This Merged). Heh :-) Pushed in 4d94cdf69889043dd8d9b1305f5f3946ec0f8ff6.
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 10c9045740..af1aa0f4c4 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -363,9 +363,12 @@ (define (activate-firmware directory) "Tell the kernel to look for device firmware under DIRECTORY. This mechanism bypasses udev: it allows Linux to handle firmware loading directly by itself, without having to resort to a \"user helper\"." - (call-with-output-file "/sys/module/firmware_class/parameters/path" - (lambda (port) - (display directory port)))) + ;; If the kernel was built without firmware loading support, this file + ;; does not exist. Do nothing in that case. + (when (file-exists? "/sys/module/firmware_class/parameters/path") + (call-with-output-file "/sys/module/firmware_class/parameters/path" + (lambda (port) + (display directory port))))) (define (activate-ptrace-attach) "Allow users to PTRACE_ATTACH their own processes.