X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournalctl.c;h=cccd8a7692af2748e158c1541f3e7c4c864af56a;hb=a9cdc94f7ff40f22a3cf9472f612a80730a1b010;hp=f4b651855771a42b7708cb1607ba43668f7b273d;hpb=8481248b9fbddc6d5e6ff26eb23505ef13dc85f7;p=elogind.git
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index f4b651855..cccd8a769 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -19,6 +19,7 @@
along with systemd; If not, see .
***/
+#include
#include
#include
#include
@@ -33,8 +34,6 @@
#include
#include
#include
-#include
-#include
#include
@@ -197,7 +196,6 @@ static int parse_argv(int argc, char *argv[]) {
case 'f':
arg_follow = true;
- signal(SIGWINCH, columns_cache_reset);
break;
case 'o':
@@ -548,8 +546,6 @@ static int add_priorities(sd_journal *j) {
if (arg_priorities & (1 << i)) {
match[sizeof(match)-2] = '0' + i;
- log_info("adding match %s", match);
-
r = sd_journal_add_match(j, match, strlen(match));
if (r < 0) {
log_error("Failed to add match: %s", strerror(-r));
@@ -722,9 +718,7 @@ static int setup_keys(void) {
#ifdef HAVE_QRENCODE
/* If this is not an UTF-8 system don't print any QR codes */
- setlocale(LC_CTYPE, "");
-
- if (streq_ptr(nl_langinfo(CODESET), "UTF-8")) {
+ if (is_locale_utf8()) {
fputs("\nTo transfer the verification key to your phone please scan the QR code below:\n\n", stderr);
print_qr_code(stderr, seed, seed_size, n, arg_interval, hn, machine);
}
@@ -827,6 +821,7 @@ int main(int argc, char *argv[]) {
bool previous_boot_id_valid = false;
unsigned n_shown = 0;
+ setlocale(LC_ALL, "");
log_parse_environment();
log_open();
@@ -834,6 +829,8 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
+ signal(SIGWINCH, columns_lines_cache_reset);
+
if (arg_action == ACTION_NEW_ID128) {
r = generate_new_id128();
goto finish;