summaryrefslogtreecommitdiff
path: root/src/basic/escape.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-05-16 17:44:57 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-05-22 10:16:00 +0200
commite3b4efd28f36a11a15531aa1a56ecadfd6f7253d (patch)
treedb6bee1c192cce630e2ddd393da860851783d78d /src/basic/escape.h
parent09c1dceef180630ecd6cf40e5c1fb653029b615c (diff)
downloadsystemd-e3b4efd28f36a11a15531aa1a56ecadfd6f7253d.tar.gz
Add 8bit-version of get_process_cmdline() and use in cgroup-show.c
This restores show_pid_array() output in legacy locales on the console. Only one call to get_process_cmdline() is changed, all others retain utf8-only mode. This affects systemd-cgls, systemctl status, etc, when working locally. Calls to get_process_cmdline() that cross a process boundary always use utf8. It's the callers responsibility to convert this to some encoding that they use. This means that we always pass utf8 over the bus.
Diffstat (limited to 'src/basic/escape.h')
-rw-r--r--src/basic/escape.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/escape.h b/src/basic/escape.h
index 45e23d0651..b26054c5df 100644
--- a/src/basic/escape.h
+++ b/src/basic/escape.h
@@ -51,6 +51,7 @@ static inline char *xescape(const char *s, const char *bad) {
return xescape_full(s, bad, SIZE_MAX, false);
}
char *octescape(const char *s, size_t len);
+char *escape_non_printable_full(const char *str, size_t console_width, bool eight_bit);
char *shell_escape(const char *s, const char *bad);
char* shell_maybe_quote(const char *s, EscapeStyle style);