diff options
Diffstat (limited to 'udev/lib/libudev.c')
-rw-r--r-- | udev/lib/libudev.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/udev/lib/libudev.c b/udev/lib/libudev.c index 2d34925912..3ff6cabbb0 100644 --- a/udev/lib/libudev.c +++ b/udev/lib/libudev.c @@ -37,6 +37,7 @@ struct udev { void (*log_fn)(struct udev *udev, int priority, const char *file, int line, const char *fn, const char *format, va_list args); + void *userdata; char *sys_path; char *dev_path; char *rules_path; @@ -89,6 +90,20 @@ static void selinux_init(struct udev *udev) #endif } +void *udev_get_userdata(struct udev *udev) +{ + if (udev == NULL) + return NULL; + return udev->userdata; +} + +void udev_set_userdata(struct udev *udev, void *userdata) +{ + if (udev == NULL) + return; + udev->userdata = userdata; +} + static void selinux_exit(struct udev *udev) { #ifdef USE_SELINUX |