summaryrefslogtreecommitdiffstats
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-12-18 07:18:26 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-01-12 01:32:20 +0100
commitc0ff3d6cbc55bc4193cdf185b0a43a28170e1668 (patch)
tree4b1429a5cb40e636b4386cd6d280b9370cfd3e99 /src/udev/udevd.c
parentudevd: reject devices which do not have SEQNUM (diff)
downloadsystemd-c0ff3d6cbc55bc4193cdf185b0a43a28170e1668.tar.xz
systemd-c0ff3d6cbc55bc4193cdf185b0a43a28170e1668.zip
udevd: make worker also log ACTION property
Diffstat (limited to '')
-rw-r--r--src/udev/udevd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index a26691ab9e..c43622ce43 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -391,7 +391,7 @@ static int worker_lock_block_device(sd_device *dev, int *ret_fd) {
static int worker_process_device(Manager *manager, sd_device *dev) {
_cleanup_(udev_event_freep) UdevEvent *udev_event = NULL;
_cleanup_close_ int fd_lock = -1;
- const char *seqnum;
+ const char *seqnum, *action;
int r;
assert(manager);
@@ -401,7 +401,11 @@ static int worker_process_device(Manager *manager, sd_device *dev) {
if (r < 0)
return log_device_debug_errno(dev, r, "Failed to get SEQNUM: %m");
- log_device_debug(dev, "Processing device (SEQNUM=%s)", seqnum);
+ r = sd_device_get_property_value(dev, "ACTION", &action);
+ if (r < 0)
+ return log_device_debug_errno(dev, r, "Failed to get ACTION: %m");
+
+ log_device_debug(dev, "Processing device (SEQNUM=%s, ACTION=%s)", seqnum, action);
udev_event = udev_event_new(dev, arg_exec_delay_usec, manager->rtnl);
if (!udev_event)
@@ -427,7 +431,7 @@ static int worker_process_device(Manager *manager, sd_device *dev) {
return log_device_debug_errno(dev, r, "Failed to update database under /run/udev/data/: %m");
}
- log_device_debug(dev, "Device (SEQNUM=%s) processed", seqnum);
+ log_device_debug(dev, "Device (SEQNUM=%s, ACTION=%s) processed", seqnum, action);
return 0;
}