GNU bug report logs -
#30604
[PATCH 0/4] Load Linux module only when supported hardware is present.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
ludo <at> gnu.org (Ludovic Courtès) skribis:
> Something annoying is that my external USB keyboard doesn’t work while
> in the initrd (when I type my passphrase). I can see that it’s detected
> early on, before I type my passphrase:
I tried looking up “modalias” right when entering a /sys/devices
directory, like you did in the initial patch, but that didn’t help:
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
index 4515839e9..213a8bbb9 100644
--- a/gnu/build/linux-modules.scm
+++ b/gnu/build/linux-modules.scm
@@ -480,19 +480,22 @@ side-effect and would thus need to traverse /sys/devices again."
(string-append module-directory "/modules.alias")))
(define (enter? director stat result) result)
- (define (down directory stat result) result)
- (define (up directory stat result) result)
- (define (skip entry stat result) result)
- (define (error name stat errno result) result)
- (define (leaf file stat result)
- (if (string=? (basename file) "modalias")
+ (define (down directory stat result)
+ ;; Check for "modalias" right when entering DIRECTORY instead of waiting
+ ;; for LEAF to be called. XXX: Doesn't help!
+ (let ((modalias (string-append directory "/modalias")))
+ (if (file-exists? modalias)
(let* ((alias (string-trim-right
- (call-with-input-file file get-string-all)))
+ (call-with-input-file modalias get-string-all)))
(modules (matching-modules alias aliases)))
(load-linux-modules-from-directory modules
module-directory)
(append modules result))
- result))
+ result)))
+ (define (up directory stat result) result)
+ (define (skip entry stat result) result)
+ (define (error name stat errno result) result)
+ (define (leaf file stat result) file stat result)
(file-system-fold enter? leaf down up skip error '() "/sys/devices"))
[Message part 3 (text/plain, inline)]
Ludo’.
This bug report was last modified 5 years and 305 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.