chiark / gitweb /
udev: get rid of SYSCONFDIR
authorKay Sievers <kay@vrfy.org>
Sun, 28 Oct 2012 03:04:22 +0000 (04:04 +0100)
committerKay Sievers <kay@vrfy.org>
Sun, 28 Oct 2012 03:04:22 +0000 (04:04 +0100)
Makefile.am
src/libudev/libudev.c
src/udev/keymap/keymap.c
src/udev/scsi_id/scsi_id.c
src/udev/udev-rules.c

index fadc1c7b59d78373d8d04d8a9becf11202e43082..415e0d39eaf5d20f45eb3e42232bc7adbd7082b5 100644 (file)
@@ -117,7 +117,6 @@ udevlibexec_PROGRAMS =
 
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
 
 AM_CPPFLAGS = \
        -include $(top_builddir)/config.h \
-       -DSYSCONFDIR=\""$(sysconfdir)"\" \
        -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
        -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
        -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
        -DSYSTEM_CONFIG_FILE=\"$(pkgsysconfdir)/system.conf\" \
        -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" \
        -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
index af36cc44524c9f788f26d803afd4435f20a61400..72a372c6328d72f10cd6fe042b303f8a46ea0b3d 100644 (file)
@@ -120,7 +120,7 @@ _public_ struct udev *udev_new(void)
         udev->log_priority = LOG_ERR;
         udev_list_init(udev, &udev->properties_list, true);
 
         udev->log_priority = LOG_ERR;
         udev_list_init(udev, &udev->properties_list, true);
 
-        f = fopen(SYSCONFDIR "/udev/udev.conf", "re");
+        f = fopen("/etc/udev/udev.conf", "re");
         if (f != NULL) {
                 char line[UTIL_LINE_SIZE];
                 int line_nr = 0;
         if (f != NULL) {
                 char line[UTIL_LINE_SIZE];
                 int line_nr = 0;
@@ -144,7 +144,7 @@ _public_ struct udev *udev_new(void)
                         /* split key/value */
                         val = strchr(key, '=');
                         if (val == NULL) {
                         /* split key/value */
                         val = strchr(key, '=');
                         if (val == NULL) {
-                                udev_err(udev, "missing <key>=<value> in " SYSCONFDIR "/udev/udev.conf[%i]; skip line\n", line_nr);
+                                udev_err(udev, "missing <key>=<value> in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
                                 continue;
                         }
                         val[0] = '\0';
                                 continue;
                         }
                         val[0] = '\0';
@@ -176,7 +176,7 @@ _public_ struct udev *udev_new(void)
                         /* unquote */
                         if (val[0] == '"' || val[0] == '\'') {
                                 if (val[len-1] != val[0]) {
                         /* unquote */
                         if (val[0] == '"' || val[0] == '\'') {
                                 if (val[len-1] != val[0]) {
-                                        udev_err(udev, "inconsistent quoting in " SYSCONFDIR "/udev/udev.conf[%i]; skip line\n", line_nr);
+                                        udev_err(udev, "inconsistent quoting in /etc/udev/udev.conf[%i]; skip line\n", line_nr);
                                         continue;
                                 }
                                 val[len-1] = '\0';
                                         continue;
                                 }
                                 val[len-1] = '\0';
index 0db56d26ad99a7dec01587dc1b8436f399d3f7be..939407fd0bd783d22aeb34856df4d976c32aba5e 100644 (file)
@@ -423,12 +423,13 @@ int main(int argc, char **argv)
                         /* Open override file if present, otherwise default file */
                         char keymap_path[PATH_MAX];
                         FILE *f;
                         /* Open override file if present, otherwise default file */
                         char keymap_path[PATH_MAX];
                         FILE *f;
-                        snprintf(keymap_path, sizeof(keymap_path), "%s%s", SYSCONFDIR "/udev/keymaps/", filearg);
+
+                        snprintf(keymap_path, sizeof(keymap_path), "/etc/udev/keymaps/%s", filearg);
                         f = fopen(keymap_path, "re");
                         if (f) {
                                 merge_table(fd, f);
                         } else {
                         f = fopen(keymap_path, "re");
                         if (f) {
                                 merge_table(fd, f);
                         } else {
-                                snprintf(keymap_path, sizeof(keymap_path), "%s%s", UDEVLIBEXECDIR "/keymaps/", filearg);
+                                snprintf(keymap_path, sizeof(keymap_path), UDEVLIBEXECDIR "/keymaps/%s", filearg);
                                 f = fopen(keymap_path, "re");
                                 if (f)
                                         merge_table(fd, f);
                                 f = fopen(keymap_path, "re");
                                 if (f)
                                         merge_table(fd, f);
index b1e089cb7c63ce3c276a19c75b81be391165988d..c90b6aa581336db5a02186078fa191d1fa63efd9 100644 (file)
@@ -53,7 +53,7 @@ static const char dev_short_options[] = "bgp:";
 
 static int all_good;
 static int dev_specified;
 
 static int all_good;
 static int dev_specified;
-static char config_file[MAX_PATH_LEN] = SYSCONFDIR "/scsi_id.config";
+static char config_file[MAX_PATH_LEN] = "/etc/scsi_id.config";
 static enum page_code default_page_code;
 static int sg_version = 4;
 static int use_stderr;
 static enum page_code default_page_code;
 static int sg_version = 4;
 static int use_stderr;
index e3bc95f391005b5cdee500de83ba300dae94d42e..6f64bf6055fdfa331bbcbb3fc259921ce231ec3b 100644 (file)
@@ -1600,7 +1600,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
         if (!rules->strbuf)
                 return udev_rules_unref(rules);
 
         if (!rules->strbuf)
                 return udev_rules_unref(rules);
 
-        rules->dirs = strv_new(SYSCONFDIR "/udev/rules.d",
+        rules->dirs = strv_new("/etc/udev/rules.d",
                                "/run/udev/rules.d",
                                UDEVLIBEXECDIR "/rules.d",
                                NULL);
                                "/run/udev/rules.d",
                                UDEVLIBEXECDIR "/rules.d",
                                NULL);