summaryrefslogtreecommitdiffstats
path: root/src/libudev/libudev-private.h
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 /src/libudev/libudev-private.h
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
Diffstat (limited to 'src/libudev/libudev-private.h')
-rw-r--r--src/libudev/libudev-private.h8
1 files changed, 8 insertions, 0 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);