summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-23 15:55:24 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-23 15:55:24 +0200
commit81cef14fce9c64afed600614403ecae7cd79781d (patch)
tree458eba19eb265752cb9a47f1aac32bf13b571605 /src/journal
parent6388c31525eff90aadddad448217fa92232890ca (diff)
coredumpctl: show comm name next to PID
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredumpctl.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 56b7becfcd..fefd02bc9b 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -441,9 +441,14 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) {
if (need_space)
fputs("\n", file);
- fprintf(file,
- " PID: %s%s%s\n",
- ansi_highlight(), strna(pid), ansi_highlight_off());
+ if (comm)
+ fprintf(file,
+ " PID: %s%s%s (%s)\n",
+ ansi_highlight(), strna(pid), ansi_highlight_off(), comm);
+ else
+ fprintf(file,
+ " PID: %s%s%s\n",
+ ansi_highlight(), strna(pid), ansi_highlight_off());
if (uid) {
uid_t n;
@@ -504,12 +509,10 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) {
fprintf(file, " Timestamp: %s\n", timestamp);
}
- if (exe)
- fprintf(file, " Executable: %s%s%s\n", ansi_highlight(), exe, ansi_highlight_off());
- if (comm)
- fprintf(file, " Comm: %s\n", comm);
if (cmdline)
fprintf(file, " Command Line: %s\n", cmdline);
+ if (exe)
+ fprintf(file, " Executable: %s%s%s\n", ansi_highlight(), exe, ansi_highlight_off());
if (cgroup)
fprintf(file, " Control Group: %s\n", cgroup);
if (unit)