sbin_PROGRAMS = fsck
dist_man_MANS = fsck.8
-fsck_SOURCES = fsck.c fsck.h
+fsck_SOURCES = fsck.c
fsck_LDADD = $(ul_libmount_la) $(ul_libblkid_la)
fsck_CFLAGS = $(AM_CFLAGS) -I$(ul_libmount_incdir) -I$(ul_libblkid_incdir)
#include "pathnames.h"
#include "exitcodes.h"
#include "c.h"
-#include "fsck.h"
#define XALLOC_EXIT_CODE FSCK_EX_ERROR
#include "xalloc.h"
+#ifndef DEFAULT_FSTYPE
+# define DEFAULT_FSTYPE "ext2"
+#endif
+
+#define MAX_DEVICES 32
+#define MAX_ARGS 32
+
static const char *ignored_types[] = {
"ignore",
"iso9660",
NULL
};
-#define BASE_MD "/dev/md"
+/*
+ * Internal structure for mount tabel entries.
+ */
+struct fsck_fs_data
+{
+ const char *device;
+ dev_t disk;
+ unsigned int stacked:1,
+ done:1,
+ eval_device:1;
+};
+
+/*
+ * Structure to allow exit codes to be stored
+ */
+struct fsck_instance {
+ int pid;
+ int flags; /* FLAG_{DONE|PROGRESS} */
+ int lock; /* flock()ed whole disk file descriptor or -1 */
+ int exit_status;
+ time_t start_time;
+ char * prog;
+ char * type;
+
+ struct libmnt_fs *fs;
+ struct fsck_instance *next;
+};
+
+#define FLAG_DONE 1
+#define FLAG_PROGRESS 2
/*
* Global variables for options
return(s ? prog : NULL);
}
-static int progress_active(NOARGS)
+static int progress_active(void)
{
struct fsck_instance *inst;
exit(FSCK_EX_USAGE);
}
-static void signal_cancel(int sig FSCK_ATTR((unused)))
+static void signal_cancel(int sig __attribute__((__unused__)))
{
cancel_requested++;
}
+++ /dev/null
-/*
- * fsck.h
- */
-
-#include <time.h>
-
-#ifdef __STDC__
-#define NOARGS void
-#else
-#define NOARGS
-#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
-
-/*
- * Internal structure for mount tabel entries.
- */
-
-struct fsck_fs_data
-{
- const char *device;
- dev_t disk;
- unsigned int stacked:1,
- done:1,
- eval_device:1;
-};
-
-#define FLAG_DONE 1
-#define FLAG_PROGRESS 2
-
-/*
- * Structure to allow exit codes to be stored
- */
-struct fsck_instance {
- int pid;
- int flags;
- int lock; /* flock()ed whole disk file descriptor or -1 */
- int exit_status;
- time_t start_time;
- char * prog;
- char * type;
- struct libmnt_fs *fs;
- struct fsck_instance *next;
-};
-
-extern char *base_device(const char *device);
-extern const char *identify_fs(const char *fs_name, const char *fs_types);
-