summaryrefslogtreecommitdiff
path: root/udevinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevinfo.c')
-rw-r--r--udevinfo.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/udevinfo.c b/udevinfo.c
index e7417697cf..045395256d 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");