journalctl: add --truncate-newline option

This commit is contained in:
zhmylove
2022-08-30 18:50:19 +03:00
committed by Lennart Poettering
parent 9a109e7cd6
commit 61cecfa0d8
8 changed files with 57 additions and 14 deletions

View File

@@ -121,7 +121,10 @@ char *strjoin_real(const char *x, ...) _sentinel_;
char *strstrip(char *s);
char *delete_chars(char *s, const char *bad);
char *delete_trailing_chars(char *s, const char *bad);
char *truncate_nl(char *s);
char *truncate_nl_full(char *s, size_t *ret_len);
static inline char *truncate_nl(char *s) {
return truncate_nl_full(s, NULL);
}
static inline char *skip_leading_chars(const char *s, const char *bad) {
if (!s)