diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-25 17:29:14 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-26 19:45:10 -0500 |
commit | cc4419ed929b5c7c99eaed020b015b1b2e8c7a66 (patch) | |
tree | 5af5baddbdf72d8f129256c2b76cc18a03a9d296 /src/coredump/coredump.c | |
parent | 7bbf2d84234db8f9dd39604a367dc56a8f5455c7 (diff) |
coredumpctl,man: mark truncated messages as such in output
Unit systemd-coredump@1-3854-0.service is failed/failed, not counting it.
TIME PID UID GID SIG COREFILE EXE
Fri 2017-02-24 11:11:00 EST 10002 1000 1000 6 none /home/zbyszek/src/systemd-work/.libs/lt-Sat 2017-02-25 00:49:32 EST 26921 0 0 11 error /usr/libexec/fprintd
Sat 2017-02-25 11:56:30 EST 30703 1000 1000 - - /usr/bin/python3.5
Sat 2017-02-25 13:16:54 EST 3275 1000 1000 11 present /usr/bin/bash
Sat 2017-02-25 17:25:40 EST 4049 1000 1000 11 truncated /usr/bin/bash
For info and gdb output, the filename is marked in red and "(truncated)" is
appended. (Red is necessary because the annotation is hard to see when running
under a pager.)
Fixed #3883.
Diffstat (limited to 'src/coredump/coredump.c')
-rw-r--r-- | src/coredump/coredump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 855f0e9330..9e7206cc6a 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -325,7 +325,7 @@ static int save_external_coredump( int *ret_node_fd, int *ret_data_fd, uint64_t *ret_size, - bool *truncated) { + bool *ret_truncated) { _cleanup_free_ char *fn = NULL, *tmp = NULL; _cleanup_close_ int fd = -1; @@ -374,8 +374,8 @@ static int save_external_coredump( log_error_errno(r, "Cannot store coredump of %s (%s): %m", context[CONTEXT_PID], context[CONTEXT_COMM]); goto fail; } - *truncated = r == 1; - if (*truncated) + *ret_truncated = r == 1; + if (*ret_truncated) log_struct(LOG_INFO, LOG_MESSAGE("Core file was truncated to %zu bytes.", max_size), "SIZE_LIMIT=%zu", max_size, |