diff options
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-builtin-kmod.c | 2 | ||||
-rw-r--r-- | src/udev/udev.h | 5 | ||||
-rw-r--r-- | src/udev/udevadm.c | 6 | ||||
-rw-r--r-- | src/udev/udevd.c | 14 |
4 files changed, 7 insertions, 20 deletions
diff --git a/src/udev/udev-builtin-kmod.c b/src/udev/udev-builtin-kmod.c index 454ee2edff..66807b381b 100644 --- a/src/udev/udev-builtin-kmod.c +++ b/src/udev/udev-builtin-kmod.c @@ -66,7 +66,7 @@ static int load_module(struct udev *udev, const char *alias) { _printf_(6,0) static void udev_kmod_log(void *data, int priority, const char *file, int line, const char *fn, const char *format, va_list args) { - udev_main_log(data, priority, file, line, fn, format, args); + log_metav(priority, file, line, fn, format, args); } static int builtin_kmod(struct udev_device *dev, int argc, char *argv[], bool test) { diff --git a/src/udev/udev.h b/src/udev/udev.h index 765ba9e86d..7668a27ae8 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -197,11 +197,6 @@ 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); -/* udev logging */ -void udev_main_log(struct udev *udev, int priority, - const char *file, int line, const char *fn, - const char *format, va_list args) _printf_(6, 0); - /* udevadm commands */ struct udevadm_cmd { const char *name; diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c index daa9387bf1..d9bd69742c 100644 --- a/src/udev/udevadm.c +++ b/src/udev/udevadm.c @@ -26,12 +26,6 @@ #include "udev.h" -void udev_main_log(struct udev *udev, int priority, - const char *file, int line, const char *fn, - const char *format, va_list args) { - log_metav(priority, file, line, fn, format, args); -} - static int adm_version(struct udev *udev, int argc, char *argv[]) { printf("%s\n", VERSION); return 0; diff --git a/src/udev/udevd.c b/src/udev/udevd.c index e03297de5b..6335b6c75a 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -54,12 +54,6 @@ #include "dev-setup.h" #include "fileio.h" -void udev_main_log(struct udev *udev, int priority, - const char *file, int line, const char *fn, - const char *format, va_list args) { - log_metav(priority, file, line, fn, format, args); -} - static struct udev_rules *rules; static struct udev_ctrl *udev_ctrl; static struct udev_monitor *monitor; @@ -82,6 +76,7 @@ static UDEV_LIST(event_list); static UDEV_LIST(worker_list); static char *udev_cgroup; static bool udev_exit; +static struct udev_list properties_list; enum event_state { EVENT_UNDEF, @@ -676,10 +671,10 @@ static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl) { val = &val[1]; if (val[0] == '\0') { log_debug("udevd message (ENV) received, unset '%s'", key); - udev_add_property(udev, key, NULL); + udev_list_entry_add(&properties_list, key, NULL); } else { log_debug("udevd message (ENV) received, set '%s=%s'", key, val); - udev_add_property(udev, key, val); + udev_list_entry_add(&properties_list, key, val); } } else { log_error("wrong key format '%s'", key); @@ -1147,6 +1142,8 @@ int main(int argc, char *argv[]) { umask(022); + udev_list_init(udev, &properties_list, true); + r = mkdir("/run/udev", 0755); if (r < 0 && errno != EEXIST) { log_error("could not create /run/udev: %m"); @@ -1535,6 +1532,7 @@ exit_daemonize: udev_monitor_unref(monitor); udev_ctrl_connection_unref(ctrl_conn); udev_ctrl_unref(udev_ctrl); + udev_list_cleanup(&properties_list); mac_selinux_finish(); udev_unref(udev); log_close(); |