#include "fileio.h"
#include "glob-util.h"
#include "hostname-util.h"
+#include "journal-internal.h"
#include "journal-remote.h"
#include "log.h"
#include "logs-show.h"
const char *value) {
RequestMeta *m = ASSERT_PTR(cls);
- _cleanup_free_ char *p = NULL;
int r;
if (isempty(key)) {
}
if (r) {
- char match[9 + 32 + 1] = "_BOOT_ID=";
sd_id128_t bid;
r = sd_id128_get_boot(&bid);
return MHD_NO;
}
- sd_id128_to_string(bid, match + 9);
- r = sd_journal_add_match(m->journal, match, sizeof(match)-1);
+ r = add_match_boot_id(m->journal, bid);
if (r < 0) {
m->argument_parse_error = r;
return MHD_NO;
return MHD_YES;
}
- p = strjoin(key, "=", strempty(value));
- if (!p) {
- m->argument_parse_error = log_oom();
- return MHD_NO;
- }
-
- r = sd_journal_add_match(m->journal, p, 0);
+ r = journal_add_match_pair(m->journal, key, strempty(value));
if (r < 0) {
m->argument_parse_error = r;
return MHD_NO;