diff options
author | David Cortarello <dcortarello@gmail.com> | 2015-03-25 01:48:36 -0300 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-03-27 11:34:13 -0400 |
commit | 6a398265f3bd30a252cba2b1ada04ff1c617cf96 (patch) | |
tree | 2a0761e4c4b46b8bb433e24032a4353cab3bed58 /src/udev/udev-rules.c | |
parent | 3cda11ed7c226adc9f4818cecfb21974239d632b (diff) |
Remove hardcoded path /run and configure using --with-rootrundir=
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r-- | src/udev/udev-rules.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index f63b87b015..5a4792e4d5 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -50,7 +50,7 @@ struct uid_gid { static const char* const rules_dirs[] = { UDEV_CONF_DIR "/rules.d", UDEV_RULES_DIR, - "/run/udev/rules.d", + UDEV_ROOT_RUN "/udev/rules.d", UDEV_LIBEXEC_DIR "/rules.d", #ifdef HAVE_SPLIT_USR "/lib/udev/rules.d", @@ -2681,7 +2681,7 @@ int udev_rules_apply_static_dev_perms(struct udev_rules *rules) { STRV_FOREACH(t, tags) { _cleanup_free_ char *unescaped_filename = NULL; - strscpyl(tags_dir, sizeof(tags_dir), "/run/udev/static_node-tags/", *t, "/", NULL); + strscpyl(tags_dir, sizeof(tags_dir), UDEV_ROOT_RUN "/udev/static_node-tags/", *t, "/", NULL); r = mkdir_p(tags_dir, 0755); if (r < 0) return log_error_errno(r, "failed to create %s: %m", tags_dir); @@ -2745,9 +2745,9 @@ finish: if (f) { fflush(f); fchmod(fileno(f), 0644); - if (ferror(f) || rename(path, "/run/udev/static_node-tags") < 0) { + if (ferror(f) || rename(path, UDEV_ROOT_RUN "/udev/static_node-tags") < 0) { r = -errno; - unlink("/run/udev/static_node-tags"); + unlink(UDEV_ROOT_RUN "/udev/static_node-tags"); unlink(path); } fclose(f); |