From f4dc8d11c22ef72567a2e5c56ac9bae82867189b Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Tue, 30 Dec 2003 22:31:37 -0800 Subject: [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 --- udevdb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'udevdb.h') diff --git a/udevdb.h b/udevdb.h index d6c58ae766..f36a9ca799 100644 --- a/udevdb.h +++ b/udevdb.h @@ -11,6 +11,7 @@ /* function prototypes */ extern void udevdb_exit(void); extern int udevdb_init(int init_flag); +extern int udevdb_open_ro(void); extern int udevdb_add_dev(const char *path, const struct udevice *dev); extern int udevdb_get_dev(const char *path, struct udevice *dev); -- cgit v1.2.3-54-g00ecf