udev: move udev cleanup functions from udev-util.h to udev.h
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "string-util.h"
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1+ */
|
||||
#pragma once
|
||||
|
||||
#include "udev.h"
|
||||
#include "util.h"
|
||||
|
||||
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);
|
||||
|
||||
int udev_parse_config(void);
|
||||
|
||||
@@ -5,14 +5,11 @@
|
||||
#include <sys/epoll.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libudev.h"
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "libudev-private.h"
|
||||
#include "log.h"
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static void print_device(struct udev_device *device) {
|
||||
const char *str;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "selinux-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
|
||||
static int fake_filesystems(void) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "libudev.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "libudev-private.h"
|
||||
#include "scsi_id.h"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "hwdb-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
|
||||
static sd_hwdb *hwdb;
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
#include "stdio-util.h"
|
||||
#include "string-util.h"
|
||||
#include "udev.h"
|
||||
#include "udev-util.h"
|
||||
|
||||
#define ONBOARD_INDEX_MAX (16*1024-1)
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "string-util.h"
|
||||
#include "sysexits.h"
|
||||
#include "udev.h"
|
||||
#include "udev-util.h"
|
||||
|
||||
_printf_(2,3)
|
||||
static void path_prepend(char **path, const char *fmt, ...) {
|
||||
|
||||
@@ -188,6 +188,13 @@ int udev_builtin_add_property(struct udev_device *dev, bool test, const char *ke
|
||||
int udev_builtin_hwdb_lookup(struct udev_device *dev, const char *prefix, const char *modalias,
|
||||
const char *filter, bool test);
|
||||
|
||||
/* Cleanup functions */
|
||||
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);
|
||||
|
||||
/* udevadm commands */
|
||||
struct udevadm_cmd {
|
||||
const char *name;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "process-util.h"
|
||||
#include "time-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
#include "udevadm-util.h"
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
#include "udevadm-util.h"
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "format-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
#include "udevadm-util.h"
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
#include "udevadm-util.h"
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "fd-util.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
#include "udev-util.h"
|
||||
#include "udev.h"
|
||||
#include "udevadm-util.h"
|
||||
#include "util.h"
|
||||
|
||||
Reference in New Issue
Block a user