summaryrefslogtreecommitdiff
path: root/src/shared/journal-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-26 18:00:39 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-28 21:37:35 -0500
commit4f37cbd91164f8cd7dbc90e3b3594697fec50f38 (patch)
treedba4e1b407e448d7630ddd85d38828c005241e99 /src/shared/journal-util.h
parent7d8e7c0e195ad014190b0eff2663b1e3a69ad328 (diff)
journalctl: move access_check() to shared/
The only functional change is that log_notice("No journal files were found.") is not printed any more with --quiet. log_error("No journal files were opened due to insufficient permissions.") is still printed. I wasn't quite sure where to put this function, but shared/ seems to be the right place and none of the existing files seem to fit too well. v2: rename journal_access_check to journal_access_check_and_warn.
Diffstat (limited to 'src/shared/journal-util.h')
-rw-r--r--src/shared/journal-util.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/shared/journal-util.h b/src/shared/journal-util.h
new file mode 100644
index 0000000000..499e6c62ec
--- /dev/null
+++ b/src/shared/journal-util.h
@@ -0,0 +1,25 @@
+/***
+ This file is part of systemd.
+
+ Copyright 2013 Zbigniew Jędrzejewski-Szmek
+ Copyright 2015 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <stdbool.h>
+
+#include "sd-journal.h"
+
+int journal_access_check_and_warn(sd_journal *j, bool quiet);