diff options
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/Makefile.am | 5 | ||||
-rw-r--r-- | src/udev/udev-event.c | 2 | ||||
-rw-r--r-- | src/udev/udev-rules.c | 4 | ||||
-rw-r--r-- | src/udev/udevadm-hwdb.c | 11 |
4 files changed, 13 insertions, 9 deletions
diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index f353e079a8..6e85181ae2 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -7,7 +7,10 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ -DMODPROBE=\"$(MODPROBE)\" \ -DROOTPREFIX=\"$(rootprefix)\" \ - -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" \ + -DUDEV_HWDB_DIR=\"$(udevhwdbdir)\" \ + -DUDEV_HWDB_BIN=\"$(udevhwdbbin)\" \ + -DUDEV_RULES_DIR=\"$(udevrulesdir)\" \ + -DUDEV_LIBEXEC_DIR=\"$(udevlibexecdir)\" \ -I $(top_srcdir)/src/libudev sbin_PROGRAMS = \ diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 30c3771fe6..46e7578d0d 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -688,7 +688,7 @@ int udev_event_spawn(struct udev_event *event, /* allow programs in /usr/lib/udev/ to be called without the path */ if (argv[0][0] != '/') { - util_strscpyl(program, sizeof(program), UDEVLIBEXECDIR "/", argv[0], NULL); + util_strscpyl(program, sizeof(program), UDEV_LIBEXEC_DIR "/", argv[0], NULL); #ifdef HAVE_SPLIT_USR if(access(program, X_OK)) util_strscpyl(program, sizeof(program), "/lib/udev/", argv[0], NULL); diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 38d5215c55..0611c1d6fa 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -1600,9 +1600,9 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) if (!rules->strbuf) return udev_rules_unref(rules); - rules->dirs = strv_new("/etc/udev/rules.d", + rules->dirs = strv_new(UDEV_RULES_DIR, "/run/udev/rules.d", - UDEVLIBEXECDIR "/rules.d", + UDEV_LIBEXEC_DIR "/rules.d", #ifdef HAVE_SPLIT_USR "/lib/udev/rules.d", #endif diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index e545689f3d..279e9255f0 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -35,8 +35,8 @@ */ static const char * const conf_file_dirs[] = { - "/etc/udev/hwdb.d", - UDEVLIBEXECDIR "/hwdb.d", + UDEV_HWDB_DIR, + UDEV_LIBEXEC_DIR "/hwdb.d", NULL }; @@ -570,10 +570,11 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { log_debug("strings dedup'ed: %8zu bytes (%8zu)\n", trie->strings->dedup_len, trie->strings->dedup_count); - mkdir_parents("/etc/udev/hwdb.bin", 0755); - err = trie_store(trie, "/etc/udev/hwdb.bin"); + mkdir_parents(UDEV_HWDB_BIN, 0755); + err = trie_store(trie, UDEV_HWDB_BIN); if (err < 0) { - log_error("Failure writing hardware database '%s': %s", "/etc/udev/hwdb.bin", strerror(-err)); + log_error("Failure writing hardware database '%s': %s", + UDEV_HWDB_BIN, strerror(-err)); rc = EXIT_FAILURE; } } |