Initialize root directory to have proper i_size.
[omfsprogs.git] / dirscan.h
blobb2ec57c81465104d6cc6ef523ffbb35de54a25fe
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 };
23 typedef struct dirscan dirscan_t;
24 typedef struct dirscan_entry dirscan_entry_t;
26 int dirscan_begin(omfs_info_t *info, int (*visit)(dirscan_t *,
27 dirscan_entry_t*, void*), void *user_data);
29 #endif