Lines Matching refs:direction
490 direction_t direction, in next_for_match() argument
516 … return journal_file_move_to_entry_by_offset_for_data(f, d, after_offset, direction, ret, offset); in next_for_match()
525 r = next_for_match(j, i, f, after_offset, direction, NULL, &cp); in next_for_match()
529 if (np == 0 || (direction == DIRECTION_DOWN ? cp < np : cp > np)) in next_for_match()
547 r = next_for_match(j, m->matches, f, after_offset, direction, NULL, &np); in next_for_match()
551 assert(direction == DIRECTION_DOWN ? np >= after_offset : np <= after_offset); in next_for_match()
557 r = next_for_match(j, i, f, np, direction, NULL, &cp); in next_for_match()
561 assert(direction == DIRECTION_DOWN ? cp >= np : cp <= np); in next_for_match()
562 if (direction == DIRECTION_DOWN ? cp > np : cp < np) { in next_for_match()
587 direction_t direction, in find_location_for_match() argument
617 …al_file_move_to_entry_by_seqnum_for_data(f, d, j->current_location.seqnum, direction, ret, offset); in find_location_for_match()
619 …for_data(f, d, j->current_location.boot_id, j->current_location.monotonic, direction, ret, offset); in find_location_for_match()
629 …ile_move_to_entry_by_realtime_for_data(f, d, j->current_location.realtime, direction, ret, offset); in find_location_for_match()
631 return journal_file_next_entry_for_data(f, d, direction, ret, offset); in find_location_for_match()
641 r = find_location_for_match(j, i, f, direction, NULL, &cp); in find_location_for_match()
645 if (np == 0 || (direction == DIRECTION_DOWN ? np > cp : np < cp)) in find_location_for_match()
678 r = find_location_for_match(j, i, f, direction, NULL, &cp); in find_location_for_match()
682 if (np == 0 || (direction == DIRECTION_DOWN ? cp > np : cp < np)) in find_location_for_match()
686 return next_for_match(j, m, f, np, direction, ret, offset); in find_location_for_match()
693 direction_t direction, in find_location_with_matches() argument
712 …return journal_file_move_to_entry_by_seqnum(f, j->current_location.seqnum, direction, ret, offset); in find_location_with_matches()
714 …y_monotonic(f, j->current_location.boot_id, j->current_location.monotonic, direction, ret, offset); in find_location_with_matches()
719 …rn journal_file_move_to_entry_by_realtime(f, j->current_location.realtime, direction, ret, offset); in find_location_with_matches()
721 return journal_file_next_entry(f, 0, direction, ret, offset); in find_location_with_matches()
723 return find_location_for_match(j, j->level0, f, direction, ret, offset); in find_location_with_matches()
729 direction_t direction, in next_with_matches() argument
741 return journal_file_next_entry(f, f->current_offset, direction, ret, offset); in next_with_matches()
746 direction == DIRECTION_DOWN ? f->current_offset + 1 in next_with_matches()
748 direction, ret, offset); in next_with_matches()
751 static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direction) { in next_beyond_location() argument
763 if (f->last_direction == direction && f->location_type == LOCATION_TAIL && in next_beyond_location()
769 if (f->last_direction == direction && f->current_offset > 0) { in next_beyond_location()
774 r = next_with_matches(j, f, direction, &c, &cp); in next_beyond_location()
781 f->last_direction = direction; in next_beyond_location()
783 r = find_location_with_matches(j, f, direction, &c, &cp); in next_beyond_location()
804 found = direction == DIRECTION_DOWN ? k > 0 : k < 0; in next_beyond_location()
811 r = next_with_matches(j, f, direction, &c, &cp); in next_beyond_location()
819 static int real_journal_next(sd_journal *j, direction_t direction) { in real_journal_next() argument
837 r = next_beyond_location(j, f, direction); in real_journal_next()
854 found = direction == DIRECTION_DOWN ? k < 0 : k > 0; in real_journal_next()
881 static int real_journal_next_skip(sd_journal *j, direction_t direction, uint64_t skip) { in real_journal_next_skip() argument
892 r = real_journal_next(j, direction); in real_journal_next_skip()
901 r = real_journal_next(j, direction); in real_journal_next_skip()