From e5ca27b772267bd18109eb460fb6653a920e551e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 4 Jun 2018 22:52:02 +0200 Subject: 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. --- src/shared/udev-util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/shared/udev-util.h') 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); -- cgit v1.2.3