Upload Tizen:Base source
[framework/base/util-linux-ng.git] / fsck / 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 #ifdef __GNUC__
15 #define FSCK_ATTR(x) __attribute__(x)
16 #else
17 #define FSCK_ATTR(x)
18 #endif
19
20
21 #ifndef DEFAULT_FSTYPE
22 #define DEFAULT_FSTYPE  "ext2"
23 #endif
24
25 #define MAX_DEVICES 32
26 #define MAX_ARGS 32
27
28 #define EXIT_OK          0
29 #define EXIT_NONDESTRUCT 1
30 #define EXIT_DESTRUCT    2
31 #define EXIT_UNCORRECTED 4
32 #define EXIT_ERROR       8
33 #define EXIT_USAGE       16
34 #define EXIT_LIBRARY     128
35
36 /*
37  * Internal structure for mount tabel entries.
38  */
39
40 struct fs_info {
41         char  *device;
42         char  *mountpt;
43         char  *type;
44         char  *opts;
45         int   freq;
46         int   passno;
47         int   flags;
48         struct fs_info *next;
49 };
50
51 #define FLAG_DONE 1
52 #define FLAG_PROGRESS 2
53
54 /*
55  * Structure to allow exit codes to be stored
56  */
57 struct fsck_instance {
58         int     pid;
59         int     flags;
60         int     exit_status;
61         time_t  start_time;
62         char *  prog;
63         char *  type;
64         char *  device;
65         char *  base_device;
66         struct fsck_instance *next;
67 };
68
69 extern char *base_device(const char *device);
70 extern const char *identify_fs(const char *fs_name, const char *fs_types);
71
72 /* ismounted.h */
73 extern int is_mounted(const char *file);