udev-util: drop udev_queue_init() from shared
It is only used in libudev, let's move it.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
@@ -578,19 +577,6 @@ int udev_queue_is_empty(void) {
|
||||
(errno == ENOENT ? true : -errno) : false;
|
||||
}
|
||||
|
||||
int udev_queue_init(void) {
|
||||
_cleanup_close_ int fd = -EBADF;
|
||||
|
||||
fd = inotify_init1(IN_CLOEXEC);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
if (inotify_add_watch(fd, "/run/udev" , IN_DELETE) < 0)
|
||||
return -errno;
|
||||
|
||||
return TAKE_FD(fd);
|
||||
}
|
||||
|
||||
bool udev_available(void) {
|
||||
static int cache = -1;
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ int udev_resolve_subsys_kernel(const char *string, char *result, size_t maxsize,
|
||||
bool devpath_conflict(const char *a, const char *b);
|
||||
|
||||
int udev_queue_is_empty(void);
|
||||
int udev_queue_init(void);
|
||||
|
||||
bool udev_available(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user