Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * fsck.h |
| 3 | */ |
| 4 | |
| 5 | #ifdef __STDC__ |
| 6 | #define NOARGS void |
| 7 | #else |
| 8 | #define NOARGS |
| 9 | #define const |
| 10 | #endif |
| 11 | |
| 12 | #ifndef DEFAULT_FSTYPE |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 13 | #define DEFAULT_FSTYPE "ext2" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 14 | #endif |
| 15 | |
| 16 | #define MAX_DEVICES 32 |
| 17 | #define MAX_ARGS 32 |
| 18 | |
| 19 | #define EXIT_OK 0 |
| 20 | #define EXIT_NONDESTRUCT 1 |
| 21 | #define EXIT_DESTRUCT 2 |
| 22 | #define EXIT_UNCORRECTED 4 |
| 23 | #define EXIT_ERROR 8 |
| 24 | #define EXIT_USAGE 16 |
| 25 | #define EXIT_LIBRARY 128 |
| 26 | |
| 27 | /* |
| 28 | * Internal structure for mount tabel entries. |
| 29 | */ |
| 30 | |
| 31 | struct fs_info { |
| 32 | char *device; |
| 33 | char *mountpt; |
| 34 | char *type; |
| 35 | char *opts; |
| 36 | int freq; |
| 37 | int passno; |
| 38 | int flags; |
| 39 | struct fs_info *next; |
| 40 | }; |
| 41 | |
| 42 | #define FLAG_DONE 1 |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 43 | #define FLAG_PROGRESS 2 |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 44 | |
| 45 | /* |
| 46 | * Structure to allow exit codes to be stored |
| 47 | */ |
| 48 | struct fsck_instance { |
| 49 | int pid; |
| 50 | int flags; |
| 51 | int exit_status; |
Theodore Ts'o | 7f4bb6c | 1999-10-20 18:11:01 +0000 | [diff] [blame^] | 52 | time_t start_time; |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 53 | char * prog; |
Theodore Ts'o | 50787ea | 1999-07-19 15:30:21 +0000 | [diff] [blame] | 54 | char * type; |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 55 | char * device; |
| 56 | struct fsck_instance *next; |
| 57 | }; |
| 58 | |
| 59 | |
| 60 | |