From 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:49:25 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- misc/fsck.h | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 misc/fsck.h (limited to 'misc/fsck.h') diff --git a/misc/fsck.h b/misc/fsck.h new file mode 100644 index 0000000..8a55fbd --- /dev/null +++ b/misc/fsck.h @@ -0,0 +1,73 @@ +/* + * fsck.h + */ + +#include + +#ifdef __STDC__ +#define NOARGS void +#else +#define NOARGS +#define const +#endif + +#ifdef __GNUC__ +#define FSCK_ATTR(x) __attribute__(x) +#else +#define FSCK_ATTR(x) +#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 table 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; + char * base_device; + struct fsck_instance *next; +}; + +extern char *base_device(const char *device); +extern const char *identify_fs(const char *fs_name, const char *fs_types); + +/* ismounted.h */ +extern int is_mounted(const char *file); -- cgit v1.2.3