mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-28 03:10:28 +08:00
7f4bb6c6e8
fsck.c (wait_one): If the fsck process just started, wait a second before sending a SIGUSR1, to give it a chance to set the signal handler; otherwise, fsck will die on an unhandled SIGUSR1.
61 lines
857 B
C
61 lines
857 B
C
/*
|
|
* fsck.h
|
|
*/
|
|
|
|
#ifdef __STDC__
|
|
#define NOARGS void
|
|
#else
|
|
#define NOARGS
|
|
#define const
|
|
#endif
|
|
|
|
#ifndef DEFAULT_FSTYPE
|
|
#define DEFAULT_FSTYPE "ext2"
|
|
#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
|
|
#define FLAG_PROGRESS 2
|
|
|
|
/*
|
|
* Structure to allow exit codes to be stored
|
|
*/
|
|
struct fsck_instance {
|
|
int pid;
|
|
int flags;
|
|
int exit_status;
|
|
time_t start_time;
|
|
char * prog;
|
|
char * type;
|
|
char * device;
|
|
struct fsck_instance *next;
|
|
};
|
|
|
|
|
|
|