summaryrefslogtreecommitdiff
path: root/src/journal/sd-journal.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-28 20:17:24 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-28 23:45:59 -0400
commit844ec79b3c2f246114ea316ebe1f36044bdb688e (patch)
tree6e937c3738ee75fdd2c22e5f9bec72d789d6e13b /src/journal/sd-journal.c
parent18cd5fe99f70a55a2d6f2303d6ee0624942695b1 (diff)
catalog: open up catalog internals
In order to write tests for the catalog functions, they are made non-static and start taking a 'database' parameter, which is the name of a file with the preprocessed catalog entries. This makes it possible to make test-catalog part of the normal test suite, since it now only operates on files in /tmp. Some more tests are added.
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r--src/journal/sd-journal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 82cacf3674..bb99671934 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2439,7 +2439,7 @@ _public_ int sd_journal_get_catalog(sd_journal *j, char **ret) {
if (r < 0)
return r;
- r = catalog_get(id, &text);
+ r = catalog_get(CATALOG_DATABASE, id, &text);
if (r < 0)
return r;
@@ -2455,7 +2455,7 @@ _public_ int sd_journal_get_catalog_for_message_id(sd_id128_t id, char **ret) {
if (!ret)
return -EINVAL;
- return catalog_get(id, ret);
+ return catalog_get(CATALOG_DATABASE, id, ret);
}
_public_ int sd_journal_set_data_threshold(sd_journal *j, size_t sz) {