coredumpctl: info shows the last entry by default

Closes #9524.
This commit is contained in:
Lion Yang 2018-07-08 06:00:39 +08:00 committed by Lennart Poettering
parent 1d2d351319
commit 2fafabfdc4
2 changed files with 4 additions and 2 deletions

View File

@ -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>

View File

@ -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;