Make the library when building dist and normal targets
[omfsprogs.git] / dirscan.h
blob6e5559a6c74dffc51f25f15b7f508041651b4039
1 #ifndef _DIRSCAN_H
2 #define _DIRSCAN_H
4 #include "stack.h"
5 #include "omfs.h"
7 struct dirscan_entry
9 omfs_inode_t *inode; /* an inode */
10 int level; /* level in the tree */
11 int hindex; /* hash index */
12 u64 parent; /* parent inode number */
13 u64 block; /* block from which inode was read */
16 struct dirscan
18 omfs_info_t *omfs_info; /* omfs lib context */
19 int (*visit) (struct dirscan *, struct dirscan_entry *, void*);
20 void *user_data;
21 int visit_error;
22 };
24 typedef struct dirscan dirscan_t;
25 typedef struct dirscan_entry dirscan_entry_t;
27 int dirscan_begin(omfs_info_t *info, int (*visit)(dirscan_t *,
28 dirscan_entry_t*, void*), void *user_data);
30 #endif