[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22050: [PATCH v3 1/2] linux-boot: Add make-static-device-nodes.
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 |
Hi Ludo,
On Thu, 14 Dec 2017 14:14:09 +0100
address@hidden (Ludovic Courtès) 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.
>
> WDYT?
That's true. The kernel interface definitely has Linus breathe down the neck
of anyone who even thinks of changing it :)
> >> What about having a ‘static-device-nodes’ procedure that would parse
> >> that and return a list of <device-node>, where:
> >>
> >> ;; TYPE is 'char or 'block, MAJOR and MINOR are integers.
> >> (define-record-type <device-node>
> >> (device-node name type major minor module)
> >> device-node?
> >> …)
> >>
> >> and then:
> >>
> >> (define create-device-node
> >> (match-lambda
> >> (($ <device-node> name type major minor)
> >> (mknod …))))
> >>
> >> finally:
> >>
> >> (for-each create-device-node (static-device-nodes))
> >>
> >> ?
> >
> > The kmod format has entries not only for mknod but also for mkdir (it
> > actually mkdirs the same directory twice sometimes which is why there was
> > another version of this patch...).
>
> 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 for "snd"
- there's a "snd/timer" and a "snd/seq" in the devname file...
- bug#22050: [PATCH 2/2] services: base: Use make-static-device-nodes., (continued)
bug#22050: [PATCH v4 0/2] Create static device nodes before starting udev., Danny Milosavljevic, 2017/12/14
- bug#22050: [PATCH v4 2/2] services: base: Use make-static-device-nodes., Danny Milosavljevic, 2017/12/14
- bug#22050: [PATCH v4 1/2] linux-boot: Add make-static-device-nodes., Danny Milosavljevic, 2017/12/14
- bug#22050: [PATCH v4 1/2] linux-boot: Add make-static-device-nodes., Ludovic Courtès, 2017/12/15
- bug#22050: [PATCH v4 1/2] linux-boot: Add make-static-device-nodes., Danny Milosavljevic, 2017/12/15
- bug#22050: [PATCH v4 1/2] linux-boot: Add make-static-device-nodes., Ludovic Courtès, 2017/12/15
bug#22050: [PATCH v5 0/2] Create static device nodes before starting udev., Danny Milosavljevic, 2017/12/14
bug#22050: [PATCH v5 2/2] services: base: Use make-static-device-nodes., Danny Milosavljevic, 2017/12/14
bug#22050: [PATCH v5 2/2] services: base: Use make-static-device-nodes., Ludovic Courtès, 2017/12/15
bug#22050: [PATCH v5 1/2] linux-boot: Add make-static-device-nodes., Danny Milosavljevic, 2017/12/14