summaryrefslogtreecommitdiff
path: root/src/journal/journal-internal.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-27 18:59:29 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-01 22:42:33 +0100
commiteb86030ec0e53ef3834d1b230440e88fdf020e9d (patch)
treeee061f784523e84ead2766b653ffac923e1b9bc5 /src/journal/journal-internal.h
parentb72190e90f0846956e609075fb9113dba9bc8f0f (diff)
sd-journal: add an API to enumerate known field names of the journal
This adds two new calls to get the list of all journal fields names currently in use. This is the low-level support to implement the feature requested in #2176 in a more optimized way.
Diffstat (limited to 'src/journal/journal-internal.h')
-rw-r--r--src/journal/journal-internal.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h
index fa5ca11636..a55d1bcc47 100644
--- a/src/journal/journal-internal.h
+++ b/src/journal/journal-internal.h
@@ -103,18 +103,27 @@ struct sd_journal {
unsigned current_invalidate_counter, last_invalidate_counter;
usec_t last_process_usec;
+ /* Iterating through unique fields and their data values */
char *unique_field;
JournalFile *unique_file;
uint64_t unique_offset;
+ /* Iterating through known fields */
+ JournalFile *fields_file;
+ uint64_t fields_offset;
+ uint64_t fields_hash_table_index;
+ char *fields_buffer;
+ size_t fields_buffer_allocated;
+
int flags;
- bool on_network;
- bool no_new_files;
- bool unique_file_lost; /* File we were iterating over got
- removed, and there were no more
- files, so sd_j_enumerate_unique
- will return a value equal to 0. */
+ bool on_network:1;
+ bool no_new_files:1;
+ bool unique_file_lost:1; /* File we were iterating over got
+ removed, and there were no more
+ files, so sd_j_enumerate_unique
+ will return a value equal to 0. */
+ bool fields_file_lost:1;
bool has_runtime_files:1;
bool has_persistent_files:1;