summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--TODO12
-rw-r--r--libudev/libudev-private.h34
-rw-r--r--udev/udev-ctrl.c (renamed from libudev/libudev-ctrl.c)3
-rw-r--r--udev/udev.h34
5 files changed, 42 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am
index 37840c34b9..0b670d5340 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,7 +68,6 @@ noinst_LTLIBRARIES = \
libudev_libudev_private_la_SOURCES =\
$(libudev_libudev_la_SOURCES) \
- libudev/libudev-ctrl.c \
libudev/libudev-util-private.c \
libudev/libudev-device-private.c \
libudev/libudev-queue-private.c
@@ -160,7 +159,8 @@ udev_common_sources =\
udev/udev-event.c \
udev/udev-watch.c \
udev/udev-node.c \
- udev/udev-rules.c
+ udev/udev-rules.c \
+ udev/udev-ctrl.c
udev_udevd_SOURCES = \
$(udev_common_sources) \
diff --git a/TODO b/TODO
index 01fb0e1fc7..7106d9c81e 100644
--- a/TODO
+++ b/TODO
@@ -2,19 +2,15 @@
- test (now fixed) /dev/tape/ links
- - remove RUN+="socket:"
-
- libudev: return proper errno or set errno
- - move ctrl.c from libudev/ to udev/
+ - /run/udev/control socket
+ (add ConditionVirtualization=!pidns)
- move:
udevd -> --libexecdir
udevadm -> --bindir
- - /run/udev/control socket
- (add ConditionVirtualization=!pidns)
-
- kill rules_generator:
- no longer rename netifs in kernel namespace
- drop persistent optical names
@@ -23,8 +19,10 @@
- properly document what system management needs to put
into rules files
- - kill tabs?
+ - remove RUN+="socket:"
- remove deprecated trigger --type=failed logic
- remove deprecated BUS=, SYSFS{}=, ID= keys
+
+ - kill tabs?
diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h
index 9ef1408ac1..0c17c45744 100644
--- a/libudev/libudev-private.h
+++ b/libudev/libudev-private.h
@@ -114,40 +114,6 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor,
struct udev_monitor *destination, struct udev_device *udev_device);
struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd);
-/* libudev-ctrl.c - daemon runtime setup */
-struct udev_ctrl;
-struct udev_ctrl *udev_ctrl_new_from_socket(struct udev *udev, const char *socket_path);
-struct udev_ctrl *udev_ctrl_new_from_socket_fd(struct udev *udev, const char *socket_path, int fd);
-int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl);
-struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl);
-struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl);
-struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl);
-int udev_ctrl_get_fd(struct udev_ctrl *uctrl);
-int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority, int timeout);
-int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl, int timeout);
-int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl, int timeout);
-int udev_ctrl_send_reload_rules(struct udev_ctrl *uctrl, int timeout);
-int udev_ctrl_send_ping(struct udev_ctrl *uctrl, int timeout);
-int udev_ctrl_send_exit(struct udev_ctrl *uctrl, int timeout);
-int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key, int timeout);
-int udev_ctrl_send_set_children_max(struct udev_ctrl *uctrl, int count, int timeout);
-struct udev_ctrl_connection;
-struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl);
-struct udev_ctrl_connection *udev_ctrl_connection_ref(struct udev_ctrl_connection *conn);
-struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connection *conn);
-struct udev_ctrl_msg;
-struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl_connection *conn);
-struct udev_ctrl_msg *udev_ctrl_msg_ref(struct udev_ctrl_msg *ctrl_msg);
-struct udev_ctrl_msg *udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_reload_rules(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg);
-const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg);
-int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg);
-
/* libudev-list.c */
enum udev_list_flags {
UDEV_LIST_NONE = 0,
diff --git a/libudev/libudev-ctrl.c b/udev/udev-ctrl.c
index e0ec2fa3d7..85e656248b 100644
--- a/libudev/libudev-ctrl.c
+++ b/udev/udev-ctrl.c
@@ -20,8 +20,7 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include "libudev.h"
-#include "libudev-private.h"
+#include "udev.h"
/* wire protocol magic must match */
#define UDEV_CTRL_MAGIC 0xdead1dea
diff --git a/udev/udev.h b/udev/udev.h
index 88c32ec203..0a693e4608 100644
--- a/udev/udev.h
+++ b/udev/udev.h
@@ -94,6 +94,40 @@ int udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid);
int udev_node_remove(struct udev_device *dev);
void udev_node_update_old_links(struct udev_device *dev, struct udev_device *dev_old);
+/* udev-ctrl.c */
+struct udev_ctrl;
+struct udev_ctrl *udev_ctrl_new_from_socket(struct udev *udev, const char *socket_path);
+struct udev_ctrl *udev_ctrl_new_from_socket_fd(struct udev *udev, const char *socket_path, int fd);
+int udev_ctrl_enable_receiving(struct udev_ctrl *uctrl);
+struct udev_ctrl *udev_ctrl_ref(struct udev_ctrl *uctrl);
+struct udev_ctrl *udev_ctrl_unref(struct udev_ctrl *uctrl);
+struct udev *udev_ctrl_get_udev(struct udev_ctrl *uctrl);
+int udev_ctrl_get_fd(struct udev_ctrl *uctrl);
+int udev_ctrl_send_set_log_level(struct udev_ctrl *uctrl, int priority, int timeout);
+int udev_ctrl_send_stop_exec_queue(struct udev_ctrl *uctrl, int timeout);
+int udev_ctrl_send_start_exec_queue(struct udev_ctrl *uctrl, int timeout);
+int udev_ctrl_send_reload_rules(struct udev_ctrl *uctrl, int timeout);
+int udev_ctrl_send_ping(struct udev_ctrl *uctrl, int timeout);
+int udev_ctrl_send_exit(struct udev_ctrl *uctrl, int timeout);
+int udev_ctrl_send_set_env(struct udev_ctrl *uctrl, const char *key, int timeout);
+int udev_ctrl_send_set_children_max(struct udev_ctrl *uctrl, int count, int timeout);
+struct udev_ctrl_connection;
+struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl);
+struct udev_ctrl_connection *udev_ctrl_connection_ref(struct udev_ctrl_connection *conn);
+struct udev_ctrl_connection *udev_ctrl_connection_unref(struct udev_ctrl_connection *conn);
+struct udev_ctrl_msg;
+struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl_connection *conn);
+struct udev_ctrl_msg *udev_ctrl_msg_ref(struct udev_ctrl_msg *ctrl_msg);
+struct udev_ctrl_msg *udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_set_log_level(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_stop_exec_queue(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_start_exec_queue(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_reload_rules(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_ping(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_exit(struct udev_ctrl_msg *ctrl_msg);
+const char *udev_ctrl_get_set_env(struct udev_ctrl_msg *ctrl_msg);
+int udev_ctrl_get_set_children_max(struct udev_ctrl_msg *ctrl_msg);
+
/* udevadm commands */
int udevadm_monitor(struct udev *udev, int argc, char *argv[]);
int udevadm_info(struct udev *udev, int argc, char *argv[]);