|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From b344bcbbfda8fbe14dadc5aa4b5dfb3ced6d76e2 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Lennart Poettering <lennart@poettering.net>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Thu, 2 Oct 2014 14:35:34 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] localectl: always print warnings with log_warning() instead
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
of printf()
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
They really should got to stderr, not stdout.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/locale/localectl.c | 9 ++++-----
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 9325d9af6d..3690f9fc89 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/locale/localectl.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/locale/localectl.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -117,13 +117,12 @@ static void print_overriden_variables(void) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
for (j = 0; j < _VARIABLE_LC_MAX; j++)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (variables[j]) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (print_warning) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- printf("Warning: Settings on Kernel Command Line override system locale settings in /etc/locale.conf\n");
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- printf(" Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ log_warning("Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.\n"
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ " Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
print_warning = false;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- continue;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- }
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- printf(" %s=%s\n", locale_variable_to_string(j), variables[j]);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ } else
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ log_warning(" %s=%s\n", locale_variable_to_string(j), variables[j]);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
finish:
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
for (j = 0; j < _VARIABLE_LC_MAX; j++)
|