projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c4c73b
)
hwdb: allow to query arbitrary keys
author
Kay Sievers
<kay@vrfy.org>
Tue, 2 Jul 2013 22:23:41 +0000
(
00:23
+0200)
committer
Kay Sievers
<kay@vrfy.org>
Tue, 2 Jul 2013 22:23:41 +0000
(
00:23
+0200)
src/udev/udev-builtin-hwdb.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-builtin-hwdb.c
b/src/udev/udev-builtin-hwdb.c
index
9895f65
..
3695891
100644
(file)
--- a/
src/udev/udev-builtin-hwdb.c
+++ b/
src/udev/udev-builtin-hwdb.c
@@
-144,6
+144,13
@@
static int builtin_hwdb(struct udev_device *dev, int argc, char *argv[], bool te
}
}
+ /* query a specific key given as argument */
+ if (argv[optind]) {
+ if (udev_builtin_hwdb_lookup(dev, argv[optind], filter, test) > 0)
+ return EXIT_SUCCESS;
+ return EXIT_FAILURE;
+ }
+
/* read data from another device than the device we will store the data */
if (device) {
srcdev = udev_device_new_from_device_id(udev_device_get_udev(dev), device);