199ca880aSopenharmony_ci/*** 299ca880aSopenharmony_ci This file is part of eudev, forked from systemd. 399ca880aSopenharmony_ci 499ca880aSopenharmony_ci Copyright 2013 Zbigniew Jędrzejewski-Szmek 599ca880aSopenharmony_ci 699ca880aSopenharmony_ci systemd is free software; you can redistribute it and/or modify it 799ca880aSopenharmony_ci under the terms of the GNU Lesser General Public License as published by 899ca880aSopenharmony_ci the Free Software Foundation; either version 2.1 of the License, or 999ca880aSopenharmony_ci (at your option) any later version. 1099ca880aSopenharmony_ci 1199ca880aSopenharmony_ci systemd is distributed in the hope that it will be useful, but 1299ca880aSopenharmony_ci WITHOUT ANY WARRANTY; without even the implied warranty of 1399ca880aSopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1499ca880aSopenharmony_ci Lesser General Public License for more details. 1599ca880aSopenharmony_ci 1699ca880aSopenharmony_ci You should have received a copy of the GNU Lesser General Public License 1799ca880aSopenharmony_ci along with systemd; If not, see <http://www.gnu.org/licenses/>. 1899ca880aSopenharmony_ci***/ 1999ca880aSopenharmony_ci 2099ca880aSopenharmony_ci#pragma once 2199ca880aSopenharmony_ci 2299ca880aSopenharmony_ci#include "udev.h" 2399ca880aSopenharmony_ci#include "util.h" 2499ca880aSopenharmony_ci 2599ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); 2699ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); 2799ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_enumerate*, udev_enumerate_unref); 2899ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_event*, udev_event_unref); 2999ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_rules*, udev_rules_unref); 3099ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl*, udev_ctrl_unref); 3199ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_connection*, udev_ctrl_connection_unref); 3299ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_ctrl_msg*, udev_ctrl_msg_unref); 3399ca880aSopenharmony_ciDEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_monitor*, udev_monitor_unref); 3499ca880aSopenharmony_ci 3599ca880aSopenharmony_ci#define _cleanup_udev_unref_ _cleanup_(udev_unrefp) 3699ca880aSopenharmony_ci#define _cleanup_udev_device_unref_ _cleanup_(udev_device_unrefp) 3799ca880aSopenharmony_ci#define _cleanup_udev_enumerate_unref_ _cleanup_(udev_enumerate_unrefp) 3899ca880aSopenharmony_ci#define _cleanup_udev_event_unref_ _cleanup_(udev_event_unrefp) 3999ca880aSopenharmony_ci#define _cleanup_udev_rules_unref_ _cleanup_(udev_rules_unrefp) 4099ca880aSopenharmony_ci#define _cleanup_udev_ctrl_unref_ _cleanup_(udev_ctrl_unrefp) 4199ca880aSopenharmony_ci#define _cleanup_udev_ctrl_connection_unref_ _cleanup_(udev_ctrl_connection_unrefp) 4299ca880aSopenharmony_ci#define _cleanup_udev_ctrl_msg_unref_ _cleanup_(udev_ctrl_msg_unrefp) 4399ca880aSopenharmony_ci#define _cleanup_udev_monitor_unref_ _cleanup_(udev_monitor_unrefp) 4499ca880aSopenharmony_ci#define _cleanup_udev_list_cleanup_ _cleanup_(udev_list_cleanup) 45