summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-test.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-03-15 17:10:17 +0100
committerTom Gundersen <teg@jklm.no>2015-03-18 14:49:20 +0100
commitbf0e00ec58c0d203d0654c083bbe5c6d9cb23328 (patch)
treeb4dada5643a9a705ab292a3ad8d4846b36c8642b /src/udev/udevadm-test.c
parent1b41981d9a62443d566df6bcabc1b5024e9f5e4a (diff)
libudev: private - introduce udev_device_new_from_synthetic_event()
This allows set_action(), read_uevent_file() and read_db() to be made internal to libudev.
Diffstat (limited to 'src/udev/udevadm-test.c')
-rw-r--r--src/udev/udevadm-test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
index 542c56eb1a..fe092cfbd9 100644
--- a/src/udev/udevadm-test.c
+++ b/src/udev/udevadm-test.c
@@ -117,18 +117,16 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
strscpy(filename, sizeof(filename), syspath);
util_remove_trailing_chars(filename, '/');
- dev = udev_device_new_from_syspath(udev, filename);
+ dev = udev_device_new_from_synthetic_event(udev, filename, action);
if (dev == NULL) {
fprintf(stderr, "unable to open device '%s'\n", filename);
rc = 4;
goto out;
}
- /* skip reading of db, but read kernel parameters */
+ /* don't read info from the db */
udev_device_set_info_loaded(dev);
- udev_device_read_uevent_file(dev);
- udev_device_set_action(dev, action);
event = udev_event_new(dev);
sigfillset(&mask);