diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-09-27 00:40:55 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-09-28 23:49:01 +0200 |
commit | cfeead6c77792a8cec83e4d5673698aef3e4d817 (patch) | |
tree | 45e25b5be1606143ad7ab9191ea09b96792ff487 /src/coredump | |
parent | 954d3a51afc0ee23e84b1aa9c4a9073901cfb766 (diff) |
coredumpctl: fix spurious "more than one entry matches" warning
sd_journal_previous() returns 0 if it didn't do any move, so the
warning was stupidly always printed.
Diffstat (limited to 'src/coredump')
-rw-r--r-- | src/coredump/coredumpctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 05a097076b..45ce31e9bb 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -706,7 +706,7 @@ static int dump_core(sd_journal* j) { return log_error_errno(r, "Coredump retrieval failed: %m"); r = sd_journal_previous(j); - if (r >= 0) + if (r > 0) log_warning("More than one entry matches, ignoring rest."); return 0; |