summaryrefslogtreecommitdiffstats
path: root/src/shared/udev-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-02-10 22:15:01 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-18 18:20:56 +0100
commita11300221482da7ffe7be2d75d508ddd411814f6 (patch)
tree009163435be6a2878d026e70439d731a1587a6e9 /src/shared/udev-util.h
parentsd-device: don't compare pointers with numeric zero (diff)
downloadsystemd-a11300221482da7ffe7be2d75d508ddd411814f6.tar.xz
systemd-a11300221482da7ffe7be2d75d508ddd411814f6.zip
sd-device: add sd_device_get_action() + sd_device_get_seqnum() + sd_device_new_from_stat_rdev()
To make sd-device properly usable for all programs we need to provide an API for the "action" field of an event, it's one of the most relevant ones, and it was so far missing. This also adds sd_device_get_seqnum(), which isn't that interesting, except for generating pretty debug output, which we use it ourselves for. This also makes device_new_from_stat_rdev() public, as it is truly useful, as we can see in our own uses of it, and I think is fairly generic to show up in the public APIs.
Diffstat (limited to 'src/shared/udev-util.h')
-rw-r--r--src/shared/udev-util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h
index 5fce03b25f..c2cf7caa67 100644
--- a/src/shared/udev-util.h
+++ b/src/shared/udev-util.h
@@ -3,7 +3,6 @@
#include "sd-device.h"
-#include "device-private.h"
#include "time-util.h"
#define UDEV_NAME_SIZE 512
@@ -35,7 +34,8 @@ static inline int udev_parse_config(void) {
int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t deadline, sd_device **ret);
int device_wait_for_devlink(const char *path, const char *subsystem, usec_t deadline, sd_device **ret);
int device_is_renaming(sd_device *dev);
-bool device_for_action(sd_device *dev, DeviceAction action);
+
+bool device_for_action(sd_device *dev, sd_device_action_t action);
void log_device_uevent(sd_device *device, const char *str);