jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

Record device metadata for non-character and non-block devices #19

Closed jcnelson closed 9 years ago

jcnelson commented 9 years ago

Udev, devfs, and friends usually only record data in /dev for block and character devices. However, on Linux and OpenBSD at least, the kernel reports events for all kinds of devices, not limited to block and character devices (e.g. network interfaces, power supplies, PCI buses, etc.).

Since a lot of other software would benefit from being able to easily query the state of these extra devices, we'll add helper scripts for these two vdev ports to record device metadata to /dev/metadata/. At the very least, we'll need scripts for power supplies (e.g. batteries, AC lines, UPSs) and network interfaces, since there are immediate consumers of that information (i.e. power applets, network configuration tools, etc.).

jcnelson commented 9 years ago

This is now the default behavior. All metadata gets written to /dev/metadata/.