chiark / gitweb /
log: also set errno to the passed error code before processing format string in log_s...
[elogind.git] / src / locale / localectl.c
index 5917364d7c308b666337095c271f6423aaead560..d4a2d29aea8d6103e0fd4f0e059b99f66c280664 100644 (file)
@@ -114,19 +114,18 @@ static void print_overriden_variables(void) {
                 goto finish;
         }
 
-        for (j = VARIABLE_LANG; j < _VARIABLE_LC_MAX; j++)
+        for (j = 0; j < _VARIABLE_LC_MAX; j++)
                 if (variables[j]) {
                         if (print_warning) {
-                                printf("Warning: Settings on Kernel Command Line override system locale settings in /etc/locale.conf\n");
-                                printf("    Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
+                                log_warning("Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.\n"
+                                            "  Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
 
                                 print_warning = false;
-                                continue;
-                        }
-                        printf("                  %s=%s\n", locale_variable_to_string(j), variables[j]);
+                        } else
+                                log_warning("                %s=%s\n", locale_variable_to_string(j), variables[j]);
                 }
  finish:
-        for (j = VARIABLE_LANG; j < _VARIABLE_LC_MAX; j++)
+        for (j = 0; j < _VARIABLE_LC_MAX; j++)
                 free(variables[j]);
 }
 
@@ -506,7 +505,7 @@ static void help(void) {
                "  list-locales             Show known locales\n"
                "  set-keymap MAP [MAP]     Set virtual console keyboard mapping\n"
                "  list-keymaps             Show known virtual console keyboard mappings\n"
-               "  set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]\n"
+               "  set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]\n"
                "                           Set X11 keyboard mapping\n"
                "  list-x11-keymap-models   Show known X11 keyboard mapping models\n"
                "  list-x11-keymap-layouts  Show known X11 keyboard mapping layouts\n"