Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libc/gen/fts-compat.h
Show All 31 Lines | |||||
#ifndef _FTS_H_ | #ifndef _FTS_H_ | ||||
#define _FTS_H_ | #define _FTS_H_ | ||||
typedef struct { | typedef struct { | ||||
struct _ftsent *fts_cur; /* current node */ | struct _ftsent *fts_cur; /* current node */ | ||||
struct _ftsent *fts_child; /* linked list of children */ | struct _ftsent *fts_child; /* linked list of children */ | ||||
struct _ftsent **fts_array; /* sort array */ | struct _ftsent **fts_array; /* sort array */ | ||||
dev_t fts_dev; /* starting device # */ | uint32_t fts_dev; /* starting device # */ | ||||
char *fts_path; /* path for this descent */ | char *fts_path; /* path for this descent */ | ||||
int fts_rfd; /* fd for root */ | int fts_rfd; /* fd for root */ | ||||
int fts_pathlen; /* sizeof(path) */ | int fts_pathlen; /* sizeof(path) */ | ||||
int fts_nitems; /* elements in the sort array */ | int fts_nitems; /* elements in the sort array */ | ||||
int (*fts_compar) /* compare function */ | int (*fts_compar) /* compare function */ | ||||
(const struct _ftsent * const *, const struct _ftsent * const *); | (const struct _ftsent * const *, const struct _ftsent * const *); | ||||
#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ | #define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ | ||||
Show All 28 Lines | |||||
#define fts_bignum __union_ftsent.__fts_bignum | #define fts_bignum __union_ftsent.__fts_bignum | ||||
char *fts_accpath; /* access path */ | char *fts_accpath; /* access path */ | ||||
char *fts_path; /* root path */ | char *fts_path; /* root path */ | ||||
int fts_errno; /* errno for this node */ | int fts_errno; /* errno for this node */ | ||||
int fts_symfd; /* fd for symlink */ | int fts_symfd; /* fd for symlink */ | ||||
u_short fts_pathlen; /* strlen(fts_path) */ | u_short fts_pathlen; /* strlen(fts_path) */ | ||||
u_short fts_namelen; /* strlen(fts_name) */ | u_short fts_namelen; /* strlen(fts_name) */ | ||||
ino_t fts_ino; /* inode */ | uint32_t fts_ino; /* inode */ | ||||
dev_t fts_dev; /* device */ | uint32_t fts_dev; /* device */ | ||||
nlink_t fts_nlink; /* link count */ | uint16_t fts_nlink; /* link count */ | ||||
#define FTS_ROOTPARENTLEVEL -1 | #define FTS_ROOTPARENTLEVEL -1 | ||||
#define FTS_ROOTLEVEL 0 | #define FTS_ROOTLEVEL 0 | ||||
short fts_level; /* depth (-1 to N) */ | short fts_level; /* depth (-1 to N) */ | ||||
#define FTS_D 1 /* preorder directory */ | #define FTS_D 1 /* preorder directory */ | ||||
#define FTS_DC 2 /* directory that causes cycles */ | #define FTS_DC 2 /* directory that causes cycles */ | ||||
#define FTS_DEFAULT 3 /* none of the above */ | #define FTS_DEFAULT 3 /* none of the above */ | ||||
Show All 16 Lines | #define FTS_ISW 0x04 /* this is a whiteout object */ | ||||
u_short fts_flags; /* private flags for FTSENT structure */ | u_short fts_flags; /* private flags for FTSENT structure */ | ||||
#define FTS_AGAIN 1 /* read node again */ | #define FTS_AGAIN 1 /* read node again */ | ||||
#define FTS_FOLLOW 2 /* follow symbolic link */ | #define FTS_FOLLOW 2 /* follow symbolic link */ | ||||
#define FTS_NOINSTR 3 /* no instructions */ | #define FTS_NOINSTR 3 /* no instructions */ | ||||
#define FTS_SKIP 4 /* discard node */ | #define FTS_SKIP 4 /* discard node */ | ||||
u_short fts_instr; /* fts_set() instructions */ | u_short fts_instr; /* fts_set() instructions */ | ||||
struct stat *fts_statp; /* stat(2) information */ | struct freebsd11_stat *fts_statp; /* stat(2) information */ | ||||
char *fts_name; /* file name */ | char *fts_name; /* file name */ | ||||
FTS *fts_fts; /* back pointer to main FTS */ | FTS *fts_fts; /* back pointer to main FTS */ | ||||
} FTSENT; | } FTSENT; | ||||
#define fts_get_clientptr(fts) ((fts)->fts_clientptr) | #define fts_get_clientptr(fts) ((fts)->fts_clientptr) | ||||
#define fts_get_stream(ftsent) ((ftsent)->fts_fts) | #define fts_get_stream(ftsent) ((ftsent)->fts_fts) | ||||
#endif /* !_FTS_H_ */ | #endif /* !_FTS_H_ */ |