localectl: always print warnings with log_warning() instead of printf()
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Oct 2014 12:35:34 +0000 (14:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 2 Oct 2014 12:39:07 +0000 (14:39 +0200)
They really should got to stderr, not stdout.

src/locale/localectl.c

index 9325d9af6d1716aab3d892fc5dbf390cee19ea0e..3690f9fc892c5037a15a42a09eb3e2f537291e3e 100644 (file)
@@ -117,13 +117,12 @@ static void print_overriden_variables(void) {
         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 = 0; j < _VARIABLE_LC_MAX; j++)