From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evgF0-00024z-TW for guix-patches@gnu.org; Tue, 13 Mar 2018 05:29:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evgEv-0006PB-Tz for guix-patches@gnu.org; Tue, 13 Mar 2018 05:29:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50181) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1evgEv-0006Op-PU for guix-patches@gnu.org; Tue, 13 Mar 2018 05:29:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1evgEv-00069R-JN for guix-patches@gnu.org; Tue, 13 Mar 2018 05:29:01 -0400 Subject: [bug#30604] [PATCH v11 5/6] linux-initrd: Provide our own 'modprobe' program. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87h8plkkkc.fsf@gnu.org> <20180312221541.1886-1-ludo@gnu.org> <20180312221541.1886-5-ludo@gnu.org> <87fu54fjfj.fsf@gnu.org> Date: Tue, 13 Mar 2018 10:28:52 +0100 In-Reply-To: <87fu54fjfj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 13 Mar 2018 09:50:40 +0100") Message-ID: <876060qq7f.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30604@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Something annoying is that my external USB keyboard doesn=E2=80=99t work = while > in the initrd (when I type my passphrase). I can see that it=E2=80=99s d= etected > early on, before I type my passphrase: I tried looking up =E2=80=9Cmodalias=E2=80=9D right when entering a /sys/de= vices directory, like you did in the initial patch, but that didn=E2=80=99t help: --=-=-= Content-Type: text/x-patch Content-Disposition: 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")) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpMdWRv4oCZLg0K --=-=-=--