GNU bug report logs -
#60129
[PATCH 0/2] VM-optimized Linux-Libre variant
Previous Next
Full log
Message #8 received at 60129 <at> debbugs.gnu.org (full text, mbox):
* gnu/build/activation.scm (activate-firmware): Check if firmware loading is
enabled before attempting to use it.
---
gnu/build/activation.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
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.
--
2.38.0
This bug report was last modified 2 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.