diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-05-25 11:04:44 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-05-25 11:04:44 +0200 |
commit | e3bff60a6ef3419af32552b54bf19331e59c01c9 (patch) | |
tree | 14a42a8e0877e998b27b140fb47e3bac35b6c0ba /src/udev/udevadm-test.c | |
parent | e735f4d4eafc8c8c296cefc8228cf91c3fcfe822 (diff) | |
download | systemd-e3bff60a6ef3419af32552b54bf19331e59c01c9.tar.gz |
Imported Upstream version 220
Diffstat (limited to 'src/udev/udevadm-test.c')
-rw-r--r-- | src/udev/udevadm-test.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c index 4922b5b6ac..fe092cfbd9 100644 --- a/src/udev/udevadm-test.c +++ b/src/udev/udevadm-test.c @@ -17,13 +17,10 @@ */ #include <stdlib.h> -#include <string.h> #include <stdio.h> #include <stddef.h> #include <unistd.h> #include <errno.h> -#include <ctype.h> -#include <fcntl.h> #include <signal.h> #include <getopt.h> #include <sys/signalfd.h> @@ -120,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); |