]>
err.no Git - systemd/commit
[PATCH] udevinfo - now a real program :)
I want to make udevinfo the standard query interface, so all the user
features of the main udev are copied in here. It is now capable to:
o query the database for a given value
o dump the whole database
o extract all possible device attributes for a sysfs_device
In addition to the known options of udev it supports the query for the
mode of the device node, and it includes the mode in the database dump:
udevinfo -d
P: /class/video4linux/video0
N: video/webcam0
M: 0666
S: camera0 kamera0
O: 500
G: 500
It is also a bit more friendly with the pathnames specified for devices or nodes.
We remove the absolute path or add it if neccessary:
udevinfo -q mode -n video/webcam0
udevinfo -q mode -n /udev/video/webcam0
0666
udevinfo -q mode -p /sys/class/video4linux/video0
udevinfo -q mode -p /class/video4linux/video0
udevinfo -q mode -p class/video4linux/video0
0666