chiark / gitweb /
vconsole: default to the kernel compiled-in keymap
[elogind.git] / src / vconsole / vconsole-setup.c
index aa5fa18525ac8aff9eb2643eb5610646f6ea019b..a652ec2b1a1b5b92061ef001c4ef21b4834f5736 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,7 +245,7 @@ int main(int argc, char **argv) {
         }
 
         if (r <= 0) {
-#if defined(TARGET_FEDORA) || defined(TARGET_MEEGO)
+#if defined(TARGET_FEDORA)
                 r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
                                    "SYSFONT", &vc_font,
                                    "SYSFONTACM", &vc_font_map,
@@ -274,7 +266,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;
                         }
 
@@ -415,7 +407,7 @@ int main(int argc, char **argv) {
                         free(vc_keytable);
 
                         if (!vc_keymap) {
-                                log_error("Out of memory.");
+                                log_oom();
                                 goto finish;
                         }
                 }
@@ -425,7 +417,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;
                         }