From: Karel Zak Date: Mon, 20 Feb 2012 16:36:54 +0000 (+0100) Subject: fsck: remove unnecessary fsck.h X-Git-Tag: v2.22-rc1~626 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ac166bf203ffaecb24deeb5658d312204b0af5c;p=thirdparty%2Futil-linux.git fsck: remove unnecessary fsck.h Signed-off-by: Karel Zak --- diff --git a/fsck/Makefile.am b/fsck/Makefile.am index 020df83f96..e9fe4578c3 100644 --- a/fsck/Makefile.am +++ b/fsck/Makefile.am @@ -3,6 +3,6 @@ include $(top_srcdir)/config/include-Makefile.am 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) diff --git a/fsck/fsck.c b/fsck/fsck.c index cbf74dcf4a..defbdae7a4 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -50,11 +50,17 @@ #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", @@ -75,7 +81,36 @@ static const char *really_wanted[] = { 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 @@ -434,7 +469,7 @@ static char *find_fsck(const char *type) return(s ? prog : NULL); } -static int progress_active(NOARGS) +static int progress_active(void) { struct fsck_instance *inst; @@ -1222,7 +1257,7 @@ static void __attribute__((__noreturn__)) usage(void) exit(FSCK_EX_USAGE); } -static void signal_cancel(int sig FSCK_ATTR((unused))) +static void signal_cancel(int sig __attribute__((__unused__))) { cancel_requested++; } diff --git a/fsck/fsck.h b/fsck/fsck.h deleted file mode 100644 index ddda58411c..0000000000 --- a/fsck/fsck.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * fsck.h - */ - -#include - -#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); -