1997-04-26 21:21:57 +08:00
|
|
|
/*
|
|
|
|
* fsck.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __STDC__
|
|
|
|
#define NOARGS void
|
|
|
|
#else
|
|
|
|
#define NOARGS
|
|
|
|
#define const
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DEFAULT_FSTYPE
|
1997-04-26 21:34:30 +08:00
|
|
|
#define DEFAULT_FSTYPE "ext2"
|
1997-04-26 21:21:57 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define MAX_DEVICES 32
|
|
|
|
#define MAX_ARGS 32
|
|
|
|
|
|
|
|
#define EXIT_OK 0
|
|
|
|
#define EXIT_NONDESTRUCT 1
|
|
|
|
#define EXIT_DESTRUCT 2
|
|
|
|
#define EXIT_UNCORRECTED 4
|
|
|
|
#define EXIT_ERROR 8
|
|
|
|
#define EXIT_USAGE 16
|
|
|
|
#define EXIT_LIBRARY 128
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Internal structure for mount tabel entries.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct fs_info {
|
|
|
|
char *device;
|
|
|
|
char *mountpt;
|
|
|
|
char *type;
|
|
|
|
char *opts;
|
|
|
|
int freq;
|
|
|
|
int passno;
|
|
|
|
int flags;
|
|
|
|
struct fs_info *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define FLAG_DONE 1
|
1999-07-19 23:30:21 +08:00
|
|
|
#define FLAG_PROGRESS 2
|
1997-04-26 21:21:57 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Structure to allow exit codes to be stored
|
|
|
|
*/
|
|
|
|
struct fsck_instance {
|
|
|
|
int pid;
|
|
|
|
int flags;
|
|
|
|
int exit_status;
|
1999-10-21 02:11:01 +08:00
|
|
|
time_t start_time;
|
1997-04-26 21:21:57 +08:00
|
|
|
char * prog;
|
1999-07-19 23:30:21 +08:00
|
|
|
char * type;
|
1997-04-26 21:21:57 +08:00
|
|
|
char * device;
|
|
|
|
struct fsck_instance *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|