Whamcloud - gitweb
fstype.c (identify_fs): New file which looks at the superblock
[tools/e2fsprogs.git] / misc / fsck.h
1 /*
2  * fsck.h
3  */
4
5 #include <time.h>
6
7 #ifdef __STDC__
8 #define NOARGS void
9 #else
10 #define NOARGS
11 #define const
12 #endif
13
14 #ifndef DEFAULT_FSTYPE
15 #define DEFAULT_FSTYPE  "ext2"
16 #endif
17
18 #define MAX_DEVICES 32
19 #define MAX_ARGS 32
20
21 #define EXIT_OK          0
22 #define EXIT_NONDESTRUCT 1
23 #define EXIT_DESTRUCT    2
24 #define EXIT_UNCORRECTED 4
25 #define EXIT_ERROR       8
26 #define EXIT_USAGE       16
27 #define EXIT_LIBRARY     128
28
29 /*
30  * Internal structure for mount tabel entries.
31  */
32
33 struct fs_info {
34         char  *device;
35         char  *mountpt;
36         char  *type;
37         char  *opts;
38         int   freq;
39         int   passno;
40         int   flags;
41         struct fs_info *next;
42 };
43
44 #define FLAG_DONE 1
45 #define FLAG_PROGRESS 2
46
47 /*
48  * Structure to allow exit codes to be stored
49  */
50 struct fsck_instance {
51         int     pid;
52         int     flags;
53         int     exit_status;
54         time_t  start_time;
55         char *  prog;
56         char *  type;
57         char *  device;
58         char *  base_device;
59         struct fsck_instance *next;
60 };
61
62 extern char *base_device(char *device);
63 extern char *string_copy(const char *s);
64 extern const char *identify_fs(const char *fs_name);