diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-02-25 07:40:14 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:39:48 -0700 |
commit | 9fe1a96d88b304af5f3315197800f6b3d16675e1 (patch) | |
tree | 75c7549c463a73342938035599686fb5d2d320b9 /udevinfo.c | |
parent | f8a178a35b8dee2ee46a3de298345aa4faa8f41e (diff) |
[PATCH] udevinfo: print devpath -> node relationship for all devices
Diffstat (limited to 'udevinfo.c')
-rw-r--r-- | udevinfo.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/udevinfo.c b/udevinfo.c index e7417697c..045395256 100644 --- a/udevinfo.c +++ b/udevinfo.c @@ -178,9 +178,14 @@ exit: return retval; } +static int print_dump(struct udevice *udev) { + printf("%s:%s/%s\n", udev->devpath, udev_root, udev->name); + return 0; +} + static int process_options(int argc, char *argv[]) { - static const char short_options[] = "an:p:q:rVh"; + static const char short_options[] = "adn:p:q:rVh"; int option; int retval = 1; struct udevice udev; @@ -245,6 +250,10 @@ static int process_options(int argc, char *argv[]) attributes = 1; break; + case 'd': + udev_db_call_foreach(print_dump); + exit(0); + case 'V': printf("udevinfo, version %s\n", UDEV_VERSION); exit(0); @@ -384,7 +393,8 @@ help: "\n" " -r print udev root\n" " -a print all SYSFS_attributes along the device chain\n" - " -s print all sysfs devices with major/minor, physical device and bus\n" + " -d print the relationship of devpath and the node name for all\n" + " devices available in the database\n" " -V print udev version\n" " -h print this help text\n" "\n"); |