From: Zbigniew Jędrzejewski-Szmek Date: Mon, 26 Sep 2016 22:40:55 +0000 (+0200) Subject: coredumpctl: fix spurious "more than one entry matches" warning X-Git-Tag: v232~173^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfeead6c77792a8cec83e4d5673698aef3e4d817;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 05a097076bf..45ce31e9bb0 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;