summaryrefslogtreecommitdiff
path: root/lib/cycle-check.h
blob: 8c50c30eae6b967af09cf41696ac41b449773cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef CYCLE_CHECK_H
# define CYCLE_CHECK_H 1

# if HAVE_INTTYPES_H
#  include <inttypes.h>
# endif
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
# include <stdbool.h>
# include "dev-ino.h"

struct cycle_check_state
{
  struct dev_ino dev_ino;
  uintmax_t chdir_counter;
  int magic;
};

void cycle_check_init (struct cycle_check_state *state);
bool cycle_check (struct cycle_check_state *state, struct stat const *sb);

#endif