teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0805-tree-wide-allow-ASCII-fallback-for-in-logs.patch

b7dd4d
From f27568d24a29590b34fec3a96a5b3b5d290ba3d8 Mon Sep 17 00:00:00 2001
b7dd4d
From: David Tardon <dtardon@redhat.com>
b7dd4d
Date: Fri, 24 Jun 2022 09:59:44 +0200
b7dd4d
Subject: [PATCH] =?UTF-8?q?tree-wide:=20allow=20ASCII=20fallback=20for=20?=
b7dd4d
 =?UTF-8?q?=E2=80=A6=20in=20logs?=
b7dd4d
MIME-Version: 1.0
b7dd4d
Content-Type: text/plain; charset=UTF-8
b7dd4d
Content-Transfer-Encoding: 8bit
b7dd4d
b7dd4d
(cherry picked from commit 28e5e1e97f47067bce190ea6b3404907d63e4320)
b7dd4d
b7dd4d
Related: #2093479
b7dd4d
---
b7dd4d
 src/core/manager.c      | 5 +++--
b7dd4d
 src/shared/vlan-util.c  | 3 ++-
b7dd4d
 src/sysusers/sysusers.c | 5 +++--
b7dd4d
 src/tmpfiles/tmpfiles.c | 6 +++---
b7dd4d
 4 files changed, 11 insertions(+), 8 deletions(-)
b7dd4d
b7dd4d
diff --git a/src/core/manager.c b/src/core/manager.c
b7dd4d
index 845c26f498..5873e5b6d7 100644
b7dd4d
--- a/src/core/manager.c
b7dd4d
+++ b/src/core/manager.c
b7dd4d
@@ -49,6 +49,7 @@
b7dd4d
 #include "io-util.h"
b7dd4d
 #include "label.h"
b7dd4d
 #include "locale-setup.h"
b7dd4d
+#include "locale-util.h"
b7dd4d
 #include "log.h"
b7dd4d
 #include "macro.h"
b7dd4d
 #include "manager.h"
b7dd4d
@@ -1404,7 +1405,7 @@ static void manager_coldplug(Manager *m) {
b7dd4d
 
b7dd4d
         assert(m);
b7dd4d
 
b7dd4d
-        log_debug("Invoking unit coldplug() handlers…");
b7dd4d
+        log_debug("Invoking unit coldplug() handlers%s", special_glyph(ELLIPSIS));
b7dd4d
 
b7dd4d
         /* Let's place the units back into their deserialized state */
b7dd4d
         HASHMAP_FOREACH_KEY(u, k, m->units, i) {
b7dd4d
@@ -1426,7 +1427,7 @@ static void manager_catchup(Manager *m) {
b7dd4d
 
b7dd4d
         assert(m);
b7dd4d
 
b7dd4d
-        log_debug("Invoking unit catchup() handlers…");
b7dd4d
+        log_debug("Invoking unit catchup() handlers%s", special_glyph(ELLIPSIS));
b7dd4d
 
b7dd4d
         /* Let's catch up on any state changes that happened while we were reloading/reexecing */
b7dd4d
         HASHMAP_FOREACH_KEY(u, k, m->units, i) {
b7dd4d
diff --git a/src/shared/vlan-util.c b/src/shared/vlan-util.c
b7dd4d
index 400994a354..9301dacbe2 100644
b7dd4d
--- a/src/shared/vlan-util.c
b7dd4d
+++ b/src/shared/vlan-util.c
b7dd4d
@@ -1,6 +1,7 @@
b7dd4d
 /* SPDX-License-Identifier: LGPL-2.1+ */
b7dd4d
 
b7dd4d
 #include "conf-parser.h"
b7dd4d
+#include "locale-util.h"
b7dd4d
 #include "parse-util.h"
b7dd4d
 #include "string-util.h"
b7dd4d
 #include "vlan-util.h"
b7dd4d
@@ -67,7 +68,7 @@ int config_parse_vlanid(
b7dd4d
 
b7dd4d
         r = parse_vlanid(rvalue, id);
b7dd4d
         if (r == -ERANGE) {
b7dd4d
-                log_syntax(unit, LOG_ERR, filename, line, r, "VLAN identifier outside of valid range 0…4094, ignoring: %s", rvalue);
b7dd4d
+                log_syntax(unit, LOG_ERR, filename, line, r, "VLAN identifier outside of valid range 0%s4094, ignoring: %s", special_glyph(ELLIPSIS), rvalue);
b7dd4d
                 return 0;
b7dd4d
         }
b7dd4d
         if (r < 0) {
b7dd4d
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
b7dd4d
index a374ebaaf4..f547388151 100644
b7dd4d
--- a/src/sysusers/sysusers.c
b7dd4d
+++ b/src/sysusers/sysusers.c
b7dd4d
@@ -12,6 +12,7 @@
b7dd4d
 #include "format-util.h"
b7dd4d
 #include "fs-util.h"
b7dd4d
 #include "hashmap.h"
b7dd4d
+#include "locale-util.h"
b7dd4d
 #include "pager.h"
b7dd4d
 #include "path-util.h"
b7dd4d
 #include "selinux-util.h"
b7dd4d
@@ -1890,13 +1891,13 @@ static int read_config_files(char **args) {
b7dd4d
 
b7dd4d
         STRV_FOREACH(f, files)
b7dd4d
                 if (p && path_equal(*f, p)) {
b7dd4d
-                        log_debug("Parsing arguments at position \"%s\"…", *f);
b7dd4d
+                        log_debug("Parsing arguments at position \"%s\"%s", *f, special_glyph(ELLIPSIS));
b7dd4d
 
b7dd4d
                         r = parse_arguments(args);
b7dd4d
                         if (r < 0)
b7dd4d
                                 return r;
b7dd4d
                 } else {
b7dd4d
-                        log_debug("Reading config file \"%s\"…", *f);
b7dd4d
+                        log_debug("Reading config file \"%s\"%s", *f, special_glyph(ELLIPSIS));
b7dd4d
 
b7dd4d
                         /* Just warn, ignore result otherwise */
b7dd4d
                         (void) read_config_file(*f, true);
b7dd4d
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
b7dd4d
index b3c2aac746..8da525120b 100644
b7dd4d
--- a/src/tmpfiles/tmpfiles.c
b7dd4d
+++ b/src/tmpfiles/tmpfiles.c
b7dd4d
@@ -2654,7 +2654,7 @@ static int read_config_file(char **config_dirs, const char *fn, bool ignore_enoe
b7dd4d
         assert(fn);
b7dd4d
 
b7dd4d
         if (streq(fn, "-")) {
b7dd4d
-                log_debug("Reading config from stdin…");
b7dd4d
+                log_debug("Reading config from stdin%s", special_glyph(ELLIPSIS));
b7dd4d
                 fn = "<stdin>";
b7dd4d
                 f = stdin;
b7dd4d
         } else {
b7dd4d
@@ -2667,7 +2667,7 @@ static int read_config_file(char **config_dirs, const char *fn, bool ignore_enoe
b7dd4d
 
b7dd4d
                         return log_error_errno(r, "Failed to open '%s': %m", fn);
b7dd4d
                 }
b7dd4d
-                log_debug("Reading config file \"%s\"…", fn);
b7dd4d
+                log_debug("Reading config file \"%s\"%s", fn, special_glyph(ELLIPSIS));
b7dd4d
                 f = _f;
b7dd4d
         }
b7dd4d
 
b7dd4d
@@ -2765,7 +2765,7 @@ static int read_config_files(char **config_dirs, char **args, bool *invalid_conf
b7dd4d
 
b7dd4d
         STRV_FOREACH(f, files)
b7dd4d
                 if (p && path_equal(*f, p)) {
b7dd4d
-                        log_debug("Parsing arguments at position \"%s\"…", *f);
b7dd4d
+                        log_debug("Parsing arguments at position \"%s\"%s", *f, special_glyph(ELLIPSIS));
b7dd4d
 
b7dd4d
                         r = parse_arguments(config_dirs, args, invalid_config);
b7dd4d
                         if (r < 0)