]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: return a non-zero EC when --grep returns no matches
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 15 May 2019 17:28:09 +0000 (19:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 16 May 2019 16:54:01 +0000 (18:54 +0200)
commit6cda6774bdd90f8496d38dcd75d9be8a12660577
treeddd059f93270f1ea9bb41159af6a2cb22649b270
parent8688c29b5aece49805a244676cba5bba0196f509
journalctl: return a non-zero EC when --grep returns no matches

When journalctl is compiled with PCRE2 support, let's return a non-zero
exit code when --grep is used and no match for given pattern is found.
This should allow users to use journalctl --grep in scripts instead of
piping journalctl into grep

Fixes #8152
src/journal/journalctl.c