in_systemd: use kv interface to query properties
#include <fluent-bit/flb_config.h>
#include <fluent-bit/flb_input.h>
#include <fluent-bit/flb_utils.h>
+#include <fluent-bit/flb_kv.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -38,7 +39,7 @@ struct flb_systemd_config *flb_systemd_config_create(struct flb_input_instance *
char *cursor = NULL;
struct stat st;
struct mk_list *head;
- struct flb_config_prop *prop;
+ struct flb_kv *kv;
struct flb_systemd_config *ctx;
int journal_filter_is_and;
size_t size;
@@ -150,16 +151,16 @@ struct flb_systemd_config *flb_systemd_config_create(struct flb_input_instance *
/* Load Systemd filters, iterate all properties */
mk_list_foreach(head, &i_ins->properties) {
- prop = mk_list_entry(head, struct flb_config_prop, _head);
- if (strcasecmp(prop->key, "systemd_filter") != 0) {
+ kv = mk_list_entry(head, struct flb_kv, _head);
+ if (strcasecmp(kv->key, "systemd_filter") != 0) {
continue;
}
- flb_debug("[in_systemd] add filter: %s (%s)", prop->val,
+ flb_debug("[in_systemd] add filter: %s (%s)", kv->val,
journal_filter_is_and ? "and" : "or");
/* Apply filter/match */
- sd_journal_add_match(ctx->j, prop->val, 0);
+ sd_journal_add_match(ctx->j, kv->val, 0);
if (journal_filter_is_and) {
sd_journal_add_conjunction(ctx->j);
} else {
