summaryrefslogtreecommitdiffstats
path: root/src/udev/udevadm-test.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-12-19 16:16:16 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-12-24 09:20:23 +0100
commiteb1a51b869de228dba591d14349e2bcb51a1df2b (patch)
tree80ce926156d91bb32ac8fe858e9c97b03cabcf64 /src/udev/udevadm-test.c
parentudev: call udev_watch_end() before udev_event_execute_rules() (diff)
downloadsystemd-eb1a51b869de228dba591d14349e2bcb51a1df2b.tar.xz
systemd-eb1a51b869de228dba591d14349e2bcb51a1df2b.zip
udev: make UdevEvent take reference to UdevWorker
Many functions take timeout_usec and friends, but those are equivalent to the Worker elements. No functional change, just refactoring.
Diffstat (limited to 'src/udev/udevadm-test.c')
-rw-r--r--src/udev/udevadm-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
index 9d1c99ed75..813638fd90 100644
--- a/src/udev/udevadm-test.c
+++ b/src/udev/udevadm-test.c
@@ -124,12 +124,12 @@ int test_main(int argc, char *argv[], void *userdata) {
/* don't read info from the db */
device_seal(dev);
- event = udev_event_new(dev, 0, NULL, LOG_DEBUG);
+ event = udev_event_new(dev, NULL);
assert_se(sigfillset(&mask) >= 0);
assert_se(sigprocmask(SIG_SETMASK, &mask, &sigmask_orig) >= 0);
- udev_event_execute_rules(event, 60 * USEC_PER_SEC, SIGKILL, NULL, rules);
+ udev_event_execute_rules(event, rules);
FOREACH_DEVICE_PROPERTY(dev, key, value)
printf("%s=%s\n", key, value);
@@ -138,7 +138,7 @@ int test_main(int argc, char *argv[], void *userdata) {
char program[UDEV_PATH_SIZE];
bool truncated;
- (void) udev_event_apply_format(event, cmd, program, sizeof(program), false, NULL, &truncated);
+ (void) udev_event_apply_format(event, cmd, program, sizeof(program), false, &truncated);
if (truncated)
log_warning("The command '%s' is truncated while substituting into '%s'.", program, cmd);
printf("run: '%s'\n", program);