From 7c7be5515f26b4b4f035b8ddae653d76df6e99e6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 22 Aug 2018 13:32:03 +0900 Subject: libudev: move cleanup functions from udev-util.h to libudev-private.h --- src/libudev/libudev-private.h | 8 ++++++++ src/shared/udev-util.h | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h index 749c78da49..5260eb6936 100644 --- a/src/libudev/libudev-private.h +++ b/src/libudev/libudev-private.h @@ -126,3 +126,11 @@ uint64_t util_string_bloom64(const char *str); /* libudev-util-private.c */ int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value); + +/* Cleanup functions */ +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_enumerate*, udev_enumerate_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_hwdb*, udev_hwdb_unref); +DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_queue*, udev_queue_unref); diff --git a/src/shared/udev-util.h b/src/shared/udev-util.h index f36c568b5a..6a3f41f511 100644 --- a/src/shared/udev-util.h +++ b/src/shared/udev-util.h @@ -4,15 +4,11 @@ #include "udev.h" #include "util.h" -DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); -DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); -DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_enumerate*, udev_enumerate_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_connection*, udev_ctrl_connection_unref); 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); -- cgit v1.2.3