OSDN Git Service

Many files:
[android-x86/external-e2fsprogs.git] / lib / ext2fs / ext2fsP.h
1 /*
2  * ext2fsP.h --- private header file for ext2 library
3  * 
4  * Copyright (C) 1997 Theodore Ts'o.
5  *
6  * %Begin-Header%
7  * This file may be redistributed under the terms of the GNU Public
8  * License.
9  * %End-Header%
10  */
11
12 #include "ext2fs.h"
13
14 /*
15  * Badblocks list
16  */
17 struct ext2_struct_badblocks_list {
18         int     magic;
19         int     num;
20         int     size;
21         blk_t   *list;
22         int     badblocks_flags;
23 };
24
25 struct ext2_struct_badblocks_iterate {
26         int             magic;
27         badblocks_list  bb;
28         int             ptr;
29 };
30
31
32 /*
33  * Directory block iterator definition
34  */
35 struct ext2_struct_dblist {
36         int                     magic;
37         ext2_filsys             fs;
38         ino_t                   size;
39         ino_t                   count;
40         int                     sorted;
41         struct ext2_db_entry *  list;
42 };
43
44 /*
45  * For directory iterators
46  */
47 struct dir_context {
48         ino_t           dir;
49         int             flags;
50         char            *buf;
51         int (*func)(struct ext2_dir_entry *dirent,
52                     int offset,
53                     int blocksize,
54                     char        *buf,
55                     void        *private);
56         int (*func2)(ino_t      dir,
57                      int        entry,
58                      struct ext2_dir_entry *dirent,
59                      int        offset,
60                      int        blocksize,
61                      char       *buf,
62                      void       *private);
63         void            *private;
64         errcode_t       errcode;
65 };
66
67 /*
68  * Inode cache structure
69  */
70 struct ext2_inode_cache {
71         void *                          buffer;
72         blk_t                           buffer_blk;
73         int                             cache_last;
74         int                             cache_size;
75         int                             refcount;
76         struct ext2_inode_cache_ent     *cache;
77 };
78
79 struct ext2_inode_cache_ent {
80         ino_t   ino;
81         struct ext2_inode inode;
82 };
83
84 /* Function prototypes */
85
86 extern int ext2_process_dir_block(ext2_filsys fs,
87                                   blk_t *blocknr,
88                                   int   blockcnt,
89                                   void  *private);
90