From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#22050: [PATCH v3 1/2] linux-boot: Add make-static-device-nodes. Date: Thu, 14 Dec 2017 19:21:54 +0100 Message-ID: <20171214192154.343942c0@scratchpost.org> References: <20171213220445.1056-1-dannym@scratchpost.org> <20171213223240.605-1-dannym@scratchpost.org> <20171213223240.605-2-dannym@scratchpost.org> <87mv2lu1xk.fsf@gnu.org> <20171214113230.78990529@scratchpost.org> <87o9n1qwny.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePY9y-00006G-1c for bug-guix@gnu.org; Thu, 14 Dec 2017 13:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePY9v-0001Lz-90 for bug-guix@gnu.org; Thu, 14 Dec 2017 13:23:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:53595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ePY9v-0001Le-43 for bug-guix@gnu.org; Thu, 14 Dec 2017 13:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ePY9u-0004V5-T9 for bug-guix@gnu.org; Thu, 14 Dec 2017 13:23:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87o9n1qwny.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22050@debbugs.gnu.org Hi Ludo, On Thu, 14 Dec 2017 14:14:09 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > The code would be slightly simpler (no pipe, etc.), and the .devname > file might be more stable than the kmod output, being a kernel > interface. >=20 > WDYT? That's true. The kernel interface definitely has Linus breathe down the ne= ck of anyone who even thinks of changing it :) > >> What about having a =E2=80=98static-device-nodes=E2=80=99 procedure th= at would parse > >> that and return a list of , where: > >>=20 > >> ;; TYPE is 'char or 'block, MAJOR and MINOR are integers. > >> (define-record-type > >> (device-node name type major minor module) > >> device-node? > >> =E2=80=A6) > >>=20 > >> and then: > >>=20 > >> (define create-device-node > >> (match-lambda > >> (($ name type major minor) > >> (mknod =E2=80=A6)))) > >>=20 > >> finally: > >>=20 > >> (for-each create-device-node (static-device-nodes)) > >>=20 > >> ? =20 > > > > The kmod format has entries not only for mknod but also for mkdir (it a= ctually mkdirs the same directory twice sometimes which is why there was an= other version of this patch...). =20 >=20 > OK, I had overlooked that. Hopefully the general approach remains > valid? Yeah. Apparently kmod autogenerates those when there's a slash in the name= it got from the devname file. That's why it generates two mkdir entries f= or "snd" - there's a "snd/timer" and a "snd/seq" in the devname file...