summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorDavid Cortarello <dcortarello@gmail.com>2015-03-25 01:48:36 -0300
committerAnthony G. Basile <blueness@gentoo.org>2015-03-27 11:34:13 -0400
commit6a398265f3bd30a252cba2b1ada04ff1c617cf96 (patch)
tree2a0761e4c4b46b8bb433e24032a4353cab3bed58 /src/udev/udevd.c
parent3cda11ed7c226adc9f4818cecfb21974239d632b (diff)
Remove hardcoded path /run and configure using --with-rootrundir=
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 7eeceb42c0..1bc292fbed 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -912,13 +912,13 @@ static void event_queue_update(void) {
int r;
if (!udev_list_node_is_empty(&event_list)) {
- r = touch("/run/udev/queue");
+ r = touch(UDEV_ROOT_RUN "/udev/queue");
if (r < 0)
- log_warning_errno(r, "could not touch /run/udev/queue: %m");
+ log_warning_errno(r, "could not touch " UDEV_ROOT_RUN "/udev/queue: %m");
} else {
- r = unlink("/run/udev/queue");
+ r = unlink(UDEV_ROOT_RUN "/udev/queue");
if (r < 0 && errno != ENOENT)
- log_warning("could not unlink /run/udev/queue: %m");
+ log_warning("could not unlink " UDEV_ROOT_RUN "/udev/queue: %m");
}
}
@@ -1124,9 +1124,9 @@ int main(int argc, char *argv[]) {
udev_list_init(udev, &properties_list, true);
- r = mkdir("/run/udev", 0755);
+ r = mkdir(UDEV_ROOT_RUN "/udev", 0755);
if (r < 0 && errno != EEXIST) {
- log_error_errno(errno, "could not create /run/udev: %m");
+ log_error_errno(errno, "could not create " UDEV_ROOT_RUN "/udev: %m");
goto exit;
}
@@ -1241,10 +1241,10 @@ int main(int argc, char *argv[]) {
inotify_add_watch(fd_inotify, UDEV_CONF_DIR "/rules.d",
IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
- if (access("/run/udev/rules.d", F_OK) < 0) {
- mkdir_p("/run/udev/rules.d", 0755);
+ if (access(UDEV_ROOT_RUN "/udev/rules.d", F_OK) < 0) {
+ mkdir_p(UDEV_ROOT_RUN "/udev/rules.d", 0755);
}
- inotify_add_watch(fd_inotify, "/run/udev/rules.d",
+ inotify_add_watch(fd_inotify, UDEV_ROOT_RUN "/udev/rules.d",
IN_DELETE | IN_MOVE | IN_CLOSE_WRITE);
udev_watch_restore(udev);
@@ -1477,7 +1477,7 @@ int main(int argc, char *argv[]) {
rc = EXIT_SUCCESS;
exit:
udev_ctrl_cleanup(udev_ctrl);
- unlink("/run/udev/queue");
+ unlink(UDEV_ROOT_RUN "/udev/queue");
exit_daemonize:
if (fd_ep >= 0)
close(fd_ep);