diff options
author | Lion Yang <lion@aosc.io> | 2018-07-08 00:00:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-07-23 17:45:53 +0200 |
commit | 2fafabfdc418aa359c2caf03391bbe1f650b12be (patch) | |
tree | 6c3c8605a589d47ea4d41289ec21dd78f1b4a116 | |
parent | Merge pull request #9658 from LukeShu/to-upstream/misc-cleanup (diff) | |
download | systemd-2fafabfdc418aa359c2caf03391bbe1f650b12be.tar.xz systemd-2fafabfdc418aa359c2caf03391bbe1f650b12be.zip |
coredumpctl: info shows the last entry by default
Closes #9524.
-rw-r--r-- | man/coredumpctl.xml | 3 | ||||
-rw-r--r-- | src/coredump/coredumpctl.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml index caa1bb1c0f..94d5626fb5 100644 --- a/man/coredumpctl.xml +++ b/man/coredumpctl.xml @@ -210,7 +210,8 @@ <varlistentry> <term><command>info</command></term> - <listitem><para>Show detailed information about core dumps + <listitem><para>Show detailed information about the last core dump + or core dumps matching specified characteristics captured in the journal.</para></listitem> </varlistentry> diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 99d07c14fb..e7ba8d3664 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -654,7 +654,8 @@ static int dump_list(int argc, char **argv, void *userdata) { * pick a fairly low data threshold here */ sd_journal_set_data_threshold(j, 4096); - if (arg_one) { + /* "info" without pattern implies "-1" */ + if (arg_one || (verb_is_info && argc == 1)) { r = focus(j); if (r < 0) return r; |