]> git.ipfire.org Git - thirdparty/systemd.git/commit - udevinfo.c
[PATCH] udevinfo - now a real program :)
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 27 Jan 2004 02:20:12 +0000 (18:20 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:18 +0000 (21:13 -0700)
commit87171e46cd9d179e0bb5549c4d74769a1be86e64
treeae26cb347fffdaff5f6800fcc1fa3def1d74286a
parenta695feaeff0551745e1a397be2daa61b8cd0cc42
[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
extras/udevinfo/Makefile
extras/udevinfo/udevinfo.c