summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-11-20 21:38:59 +0100
committerLennart Poettering <lennart@poettering.net>2012-11-20 21:39:16 +0100
commit8f1e860f8a55e2baa336a5abb7e53abb3f77a9ad (patch)
treeb745cecf9379bbf55fd245a1c1614dac009329ff /src/journal/sd-journal.c
parente41814846c19a48f4490169d82e359e005c4db45 (diff)
journal: add sd_journal_get_catalog_for_message_id() as API to get catalog entry for any message ID without requiring an open journal file
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 41f0c4dfb4..fe0478f166 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2449,3 +2449,10 @@ _public_ int sd_journal_get_catalog(sd_journal *j, char **ret) {
*ret = t;
return 0;
}
+
+_public_ int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret) {
+ if (!ret)
+ return -EINVAL;
+
+ return catalog_get(id, ret);
+}