From: Marius Bakke <marius@gnu.org>
To: 60129@debbugs.gnu.org
Subject: [bug#60129] [PATCH 1/2] activation: Firmware activation handles missing support in kernel.
Date: Fri, 16 Dec 2022 23:15:33 +0100 [thread overview]
Message-ID: <20221216221534.14500-1-marius@gnu.org> (raw)
In-Reply-To: <20221216221147.13945-1-marius@gnu.org>
* 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
next prev parent reply other threads:[~2022-12-16 22:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 22:11 [bug#60129] [PATCH 0/2] VM-optimized Linux-Libre variant Marius Bakke
2022-12-16 22:15 ` Marius Bakke [this message]
2022-12-16 22:15 ` [bug#60129] [PATCH 2/2] gnu: Add linux-libre-virtual Marius Bakke
2022-12-16 23:40 ` [bug#60129] [PATCH 1/2] activation: Firmware activation handles missing support in kernel Tobias Geerinckx-Rice via Guix-patches via
2022-12-17 16:10 ` Marius Bakke
2022-12-17 16:32 ` [bug#60129] [PATCH 0/2] VM-optimized Linux-Libre variant Ludovic Courtès
2022-12-23 18:14 ` Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221216221534.14500-1-marius@gnu.org \
--to=marius@gnu.org \
--cc=60129@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).