summaryrefslogtreecommitdiff
path: root/src/systemd/sd-journal.h
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2016-02-01 09:23:58 +0100
committerJan Synacek <jsynacek@redhat.com>2016-02-01 11:59:27 +0100
commit39fd5b08a73f144a20202a665bd25cad51d8a90b (patch)
treec52246c727f6cda7aad57b5e5035e82c08c74e87 /src/systemd/sd-journal.h
parentc25bf528a1ad0ef19d70882ddfd4d4eccba05bc7 (diff)
downloadsystemd-39fd5b08a73f144a20202a665bd25cad51d8a90b.tar.gz
sd-journal: introduce has_runtime_files and has_persistent_files
Also introduce sd_journal_has_runtime_files() and sd_journal_has_persistent_files() to the public API. These functions can be used to easily find out if the open journal files are runtime and/or persistent.
Diffstat (limited to 'src/systemd/sd-journal.h')
-rw-r--r--src/systemd/sd-journal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h
index 33e36149e9..7f16c69ce5 100644
--- a/src/systemd/sd-journal.h
+++ b/src/systemd/sd-journal.h
@@ -139,6 +139,9 @@ int sd_journal_reliable_fd(sd_journal *j);
int sd_journal_get_catalog(sd_journal *j, char **text);
int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **text);
+int sd_journal_has_runtime_files(sd_journal *j);
+int sd_journal_has_persistent_files(sd_journal *j);
+
/* the inverse condition avoids ambiguity of danling 'else' after the macro */
#define SD_JOURNAL_FOREACH(j) \
if (sd_journal_seek_head(j) < 0) { } \