diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-16 15:47:01 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-12-18 11:53:08 +0100 |
commit | 14499361a537f769fadfb2e9323c8a65d31e6862 (patch) | |
tree | a0d022852fd7fc173296c6a4d2f75daeaed722c5 /src/journal/journal-file.c | |
parent | ae2adbcd09bd383b5a18728dfd32cf604c2c910e (diff) |
journal: delete unused function journal_file_skip_entry()
Its only caller is a test.
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 75a7c11a0a..efe14b0d92 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1995,55 +1995,6 @@ int journal_file_next_entry( return 1; } -int journal_file_skip_entry( - JournalFile *f, - Object *o, uint64_t p, - int64_t skip, - Object **ret, uint64_t *offset) { - - uint64_t i, n; - int r; - - assert(f); - assert(o); - assert(p > 0); - - if (o->object.type != OBJECT_ENTRY) - return -EINVAL; - - r = generic_array_bisect(f, - le64toh(f->header->entry_array_offset), - le64toh(f->header->n_entries), - p, - test_object_offset, - DIRECTION_DOWN, - NULL, NULL, - &i); - if (r <= 0) - return r; - - /* Calculate new index */ - if (skip < 0) { - if ((uint64_t) -skip >= i) - i = 0; - else - i = i - (uint64_t) -skip; - } else - i += (uint64_t) skip; - - n = le64toh(f->header->n_entries); - if (n <= 0) - return -EBADMSG; - - if (i >= n) - i = n-1; - - return generic_array_get(f, - le64toh(f->header->entry_array_offset), - i, - ret, offset); -} - int journal_file_next_entry_for_data( JournalFile *f, Object *o, uint64_t p, |