summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-08-22 06:32:03 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-08-22 21:57:39 +0200
commit7c7be5515f26b4b4f035b8ddae653d76df6e99e6 (patch)
tree6a58bc1d4c14335f25373d2e7d86b366bbb5f390
parentlibudev: accept NULL as the argument 'struct udev*' for udev_monitor_new() or... (diff)
downloadsystemd-7c7be5515f26b4b4f035b8ddae653d76df6e99e6.tar.xz
systemd-7c7be5515f26b4b4f035b8ddae653d76df6e99e6.zip
libudev: move cleanup functions from udev-util.h to libudev-private.h
-rw-r--r--src/libudev/libudev-private.h8
-rw-r--r--src/shared/udev-util.h4
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);