summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/libsystemd-journal.sym1
-rw-r--r--src/journal/sd-journal.c7
-rw-r--r--src/systemd/sd-journal.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/src/journal/libsystemd-journal.sym b/src/journal/libsystemd-journal.sym
index d4b0c32612..17b5bf80d9 100644
--- a/src/journal/libsystemd-journal.sym
+++ b/src/journal/libsystemd-journal.sym
@@ -85,4 +85,5 @@ LIBSYSTEMD_JOURNAL_196 {
global:
sd_journal_fd_reliable;
sd_journal_get_catalog;
+ sd_journal_get_catalog_for_message_id;
} LIBSYSTEMD_JOURNAL_195;
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);
+}
diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h
index f9919b29f1..fd9c0f5620 100644
--- a/src/systemd/sd-journal.h
+++ b/src/systemd/sd-journal.h
@@ -129,6 +129,7 @@ int sd_journal_process(sd_journal *j);
int sd_journal_wait(sd_journal *j, uint64_t timeout_usec);
int sd_journal_get_catalog(sd_journal *j, char **text);
+int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret);
#define SD_JOURNAL_FOREACH(j) \
if (sd_journal_seek_head(j) >= 0) \