chiark / gitweb /
libudev: ctrl - move code to udev directory
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 10 Jul 2011 23:16:32 +0000 (01:16 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 10 Jul 2011 23:16:32 +0000 (01:16 +0200)
Makefile.am
TODO
libudev/libudev-private.h
udev/udev-ctrl.c [moved from libudev/libudev-ctrl.c with 99% similarity]
udev/udev.h

index 37840c3..0b670d5 100644 (file)
@@ -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 01fb0e1..7106d9c 100644 (file)
--- 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
    - 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?
index 9ef1408..0c17c45 100644 (file)
@@ -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,
similarity index 99%
rename from libudev/libudev-ctrl.c
rename to udev/udev-ctrl.c
index e0ec2fa..85e6562 100644 (file)
@@ -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
index 88c32ec..0a693e4 100644 (file)
@@ -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[]);