chiark / gitweb /
udevd: make udev_ctrl_connection global
authorTom Gundersen <teg@jklm.no>
Mon, 11 May 2015 20:17:49 +0000 (22:17 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:55:39 +0000 (09:55 +0100)
This allows us to simplify the ctrl_msg handler. Eventually all this global state should move to
a Manager object or so.

src/shared/udev-util.h

index a729bceaa37282c3a3761e8652bd9febcb1c7072..5a3b9cfc1156650516a706aa68462609b0b603f2 100644 (file)
 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_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);
 
 #define _cleanup_udev_unref_ _cleanup_(udev_unrefp)
 #define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp)
 #define _cleanup_udev_enumerate_unref_ _cleanup_(udev_enumerate_unrefp)
+#define _cleanup_udev_ctrl_connection_unref_ _cleanup_(udev_ctrl_connection_unrefp)
+#define _cleanup_udev_ctrl_msg_unref_ _cleanup_(udev_ctrl_msg_unrefp)
 #define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp)
 #define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup)