chiark / gitweb /
[PATCH] make udev user callable to query the database
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Wed, 31 Dec 2003 06:31:37 +0000 (22:31 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:12 +0000 (21:13 -0700)
commitf4dc8d11c22ef72567a2e5c56ac9bae82867189b
tree9d7f00e254092ec7fe277c7db1dbc75abb5c9f9f
parentc78cb204bc64bce32e705dead071bd4149b731ac
[PATCH] make udev user callable to query the database

Here is a slightly better version that prints the usage if a unknown option is given:
  kay@pim:~/src/udev.kay$ ./udev -x
  ./udev: invalid option -- x
  Usage: [-qrVh]
    -q arg     query database
    -r         print udev root
    -V         print udev version
    -h         print this help text

> Here is a patch that makes it possible to call udev with options on the command line.
> Valid options are for now:
>
> -V for the udev version:
>     kay@pim:~/src/udev.kay$ ./udev -V
>     udev, version 011_bk
>
> -r for the udev root:
>     kay@pim:~/src/udev.kay$ ./udev -r
>     /udev/
>
> -q to query the database with the sysfs path for the name of the node:
>     kay@pim:~/src/udev.kay$ ./udev -q /class/video4linux/video0
>     test/video/webcam0
udev.c
udevdb.c
udevdb.h