Lines Matching defs:direction
507 direction_t direction,
526 return journal_file_move_to_entry_by_offset_for_data(f, dp, after_offset, direction, ret, offset);
536 r = next_for_match(j, i, f, after_offset, direction, NULL, &cp);
540 if (np == 0 || (direction == DIRECTION_DOWN ? cp < np : cp > np))
558 r = next_for_match(j, m->matches, f, after_offset, direction, NULL, &np);
562 assert(direction == DIRECTION_DOWN ? np >= after_offset : np <= after_offset);
568 r = next_for_match(j, i, f, np, direction, NULL, &cp);
572 assert(direction == DIRECTION_DOWN ? cp >= np : cp <= np);
573 if (direction == DIRECTION_DOWN ? cp > np : cp < np) {
598 direction_t direction,
622 return journal_file_move_to_entry_by_seqnum_for_data(f, dp, j->current_location.seqnum, direction, ret, offset);
624 r = journal_file_move_to_entry_by_monotonic_for_data(f, dp, j->current_location.boot_id, j->current_location.monotonic, direction, ret, offset);
629 return journal_file_move_to_entry_by_realtime_for_data(f, dp, j->current_location.realtime, direction, ret, offset);
631 return journal_file_next_entry_for_data(f, NULL, 0, dp, direction, ret, offset);
643 r = find_location_for_match(j, i, f, direction, NULL, &cp);
647 if (np == 0 || (direction == DIRECTION_DOWN ? np > cp : np < cp))
681 r = find_location_for_match(j, i, f, direction, NULL, &cp);
685 if (np == 0 || (direction == DIRECTION_DOWN ? cp > np : cp < np))
689 return next_for_match(j, m, f, np, direction, ret, offset);
696 direction_t direction,
715 return journal_file_move_to_entry_by_seqnum(f, j->current_location.seqnum, direction, ret, offset);
717 r = journal_file_move_to_entry_by_monotonic(f, j->current_location.boot_id, j->current_location.monotonic, direction, ret, offset);
722 return journal_file_move_to_entry_by_realtime(f, j->current_location.realtime, direction, ret, offset);
724 return journal_file_next_entry(f, 0, direction, ret, offset);
726 return find_location_for_match(j, j->level0, f, direction, ret, offset);
732 direction_t direction,
744 return journal_file_next_entry(f, f->current_offset, direction, ret, offset);
749 direction == DIRECTION_DOWN ? f->current_offset + 1
751 direction, ret, offset);
754 static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direction) {
765 * unless direction changed or new entries appeared. */
766 if (f->last_direction == direction && f->location_type == LOCATION_TAIL &&
772 if (f->last_direction == direction && f->current_offset > 0) {
777 r = next_with_matches(j, f, direction, &c, &cp);
784 f->last_direction = direction;
786 r = find_location_with_matches(j, f, direction, &c, &cp);
807 found = direction == DIRECTION_DOWN ? k > 0 : k < 0;
814 r = next_with_matches(j, f, direction, &c, &cp);
822 static int real_journal_next(sd_journal *j, direction_t direction) {
834 r = next_beyond_location(j, f, direction);
851 found = direction == DIRECTION_DOWN ? k < 0 : k > 0;
878 static int real_journal_next_skip(sd_journal *j, direction_t direction, uint64_t skip) {
888 return real_journal_next(j, direction);
894 r = real_journal_next(j, direction);