mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
journal: abstract the resetting of JournalFile's location
This commit is contained in:
parent
99cc7653a8
commit
1fc605b0e1
@ -1928,6 +1928,10 @@ int journal_file_move_to_entry_by_monotonic(
|
||||
ret, offset, NULL);
|
||||
}
|
||||
|
||||
void journal_file_reset_location(JournalFile *f) {
|
||||
f->current_offset = 0;
|
||||
}
|
||||
|
||||
int journal_file_next_entry(
|
||||
JournalFile *f,
|
||||
Object *o, uint64_t p,
|
||||
|
@ -189,6 +189,7 @@ int journal_file_find_data_object_with_hash(JournalFile *f, const void *data, ui
|
||||
int journal_file_find_field_object(JournalFile *f, const void *field, uint64_t size, Object **ret, uint64_t *offset);
|
||||
int journal_file_find_field_object_with_hash(JournalFile *f, const void *field, uint64_t size, uint64_t hash, Object **ret, uint64_t *offset);
|
||||
|
||||
void journal_file_reset_location(JournalFile *f);
|
||||
int journal_file_next_entry(JournalFile *f, Object *o, uint64_t p, direction_t direction, Object **ret, uint64_t *offset);
|
||||
|
||||
int journal_file_next_entry_for_data(JournalFile *f, Object *o, uint64_t p, uint64_t data_offset, direction_t direction, Object **ret, uint64_t *offset);
|
||||
|
@ -87,7 +87,7 @@ static void detach_location(sd_journal *j) {
|
||||
j->current_field = 0;
|
||||
|
||||
ORDERED_HASHMAP_FOREACH(f, j->files, i)
|
||||
f->current_offset = 0;
|
||||
journal_file_reset_location(f);
|
||||
}
|
||||
|
||||
static void reset_location(sd_journal *j) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user