return journal_file_next_entry(f, c, cp, direction, ret, offset);
/* If we have a match then we look for the next matching entry
- * wiht an offset at least one step larger */
+ * with an offset at least one step larger */
return next_for_match(j, j->level0, f, direction == DIRECTION_DOWN ? cp+1 : cp-1, direction, ret, offset);
}
return 0;
}
- r = journal_file_open(path, O_RDONLY, 0, NULL, &f);
+ r = journal_file_open(path, O_RDONLY, 0, NULL, NULL, &f);
free(path);
if (r < 0) {
return first ? 0 : 1;
}
+void journal_print_header(sd_journal *j) {
+ Iterator i;
+ JournalFile *f;
+ bool newline = false;
+
+ assert(j);
+
+ HASHMAP_FOREACH(f, j->files, i) {
+ if (newline)
+ putchar('\n');
+ else
+ newline = true;
+
+ journal_file_print_header(f);
+ }
+}
/* _public_ int sd_journal_query_unique(sd_journal *j, const char *field) { */
/* if (!j) */