chiark / gitweb /
remove Fedora hostname, locale, vconsole legacy file support
[elogind.git] / src / vconsole / vconsole-setup.c
index aa5fa18525ac8aff9eb2643eb5610646f6ea019b..6e016ad338675714a6c5cf496d0ad200c31688d5 100644 (file)
@@ -214,14 +214,6 @@ int main(int argc, char **argv) {
 
         utf8 = is_locale_utf8();
 
-        vc_keymap = strdup("us");
-        vc_font = strdup(DEFAULT_FONT);
-
-        if (!vc_keymap || !vc_font) {
-                log_error("Failed to allocate strings.");
-                goto finish;
-        }
-
         r = 0;
 
         if (detect_container(NULL) <= 0) {
@@ -253,36 +245,7 @@ int main(int argc, char **argv) {
         }
 
         if (r <= 0) {
-#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
-                r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
-                                   "SYSFONT", &vc_font,
-                                   "SYSFONTACM", &vc_font_map,
-                                   "UNIMAP", &vc_font_unimap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
-
-                r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
-                                   "KEYTABLE", &vc_keymap,
-                                   "KEYMAP", &vc_keymap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r));
-
-                if (access("/etc/sysconfig/console/default.kmap", F_OK) >= 0) {
-                        char *t;
-
-                        t = strdup("/etc/sysconfig/console/default.kmap");
-                        if (!t) {
-                                log_error("Out of memory.");
-                                goto finish;
-                        }
-
-                        free(vc_keymap);
-                        vc_keymap = t;
-                }
-
-#elif defined(TARGET_SUSE)
+#if defined(TARGET_SUSE)
                 r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
                                    "KEYTABLE", &vc_keymap,
                                    NULL);
@@ -415,7 +378,7 @@ int main(int argc, char **argv) {
                         free(vc_keytable);
 
                         if (!vc_keymap) {
-                                log_error("Out of memory.");
+                                log_oom();
                                 goto finish;
                         }
                 }
@@ -425,7 +388,7 @@ int main(int argc, char **argv) {
 
                         t = strdup("/etc/sysconfig/console/default.kmap");
                         if (!t) {
-                                log_error("Out of memory.");
+                                log_oom();
                                 goto finish;
                         }