summaryrefslogtreecommitdiffstats
path: root/src/shared/udev-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-04 22:52:02 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-07 13:36:19 +0200
commite5ca27b772267bd18109eb460fb6653a920e551e (patch)
treee0a23f07c1ae580171d27e82a5e7763d52ea4bdf /src/shared/udev-util.h
parentcore: split out device validation from device_found_node() (diff)
downloadsystemd-e5ca27b772267bd18109eb460fb6653a920e551e.tar.xz
systemd-e5ca27b772267bd18109eb460fb6653a920e551e.zip
udev: add helper udev_device_new_from_stat_rdev()
This is a simple wrapper around udev_device_new_from_devnum(), and uses the data from a struct stat's .st_rdev field to derive the udev_device object.
Diffstat (limited to '')
-rw-r--r--src/shared/udev-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h
index 0f270f7fbd..ce40f695e8 100644
--- a/src/shared/udev-util.h
+++ b/src/shared/udev-util.h
@@ -21,3 +21,5 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_msg*, udev_ctrl_msg_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref);
int udev_parse_config(void);
+
+int udev_device_new_from_stat_rdev(struct udev *udev, const struct stat *st, struct udev_device **ret);