Commit Graph

4 Commits

Author SHA1 Message Date
Lucas De Marchi 19ac5bd8a0 static-nodes: Fix indentation
kmod uses tab instead of spaces and tries to honour 80chr limit, when
that doesn't worsen the readability.
2013-04-19 19:28:46 -03:00
Tom Gundersen 4905769de7 static-nodes: tmpfiles - also create parents directories of device nodes
Before:

c /dev/cpu/microcode 0600 - - - 10:184
c /dev/fuse 0600 - - - 10:229
c /dev/btrfs-control 0600 - - - 10:234
c /dev/loop-control 0600 - - - 10:237
c /dev/snd/timer 0600 - - - 116:33

After:

d /dev/cpu 0755 - - -
c /dev/cpu/microcode 0600 - - - 10:184
c /dev/fuse 0600 - - - 10:229
c /dev/btrfs-control 0600 - - - 10:234
c /dev/loop-control 0600 - - - 10:237
d /dev/snd 0755 - - -
c /dev/snd/timer 0600 - - - 116:33
2013-04-19 19:03:03 -03:00
Lucas De Marchi 279b177de6 kmod: It's an error not to have modules.devname
This file is created by depmod even if there's no node. In this case it
will be empty.

Previously 'kmod static-nodes' was segfaulting due to passing in==NULL
to fgets.

Also show the error message with %m.
2013-04-17 00:57:11 -03:00
Tom Gundersen db6f2fc7e1 tools: add static-nodes tool
This tool reads modules.devname from the current kernel directory and outputs
the information. By default in a human-readable format, and optionally in
machine-readable formats.

For now only the tmpfiles.d(5) format is supported, but more could easily be
added in the future if there is a need.

This means nothing but kmod needs to reads the private files under
/lib/modules/. In particular systemd-udevd can stop reading modules.devname.

Tools that used to read /lib/modules/`uname -r`/modules.devname directly, can
now move to reading 'kmod static-nodes devname'.
2013-04-16 23:10:36 -03:00