diff options
Diffstat (limited to 'sbin/fsck/fsck.c')
-rw-r--r-- | sbin/fsck/fsck.c | 69 |
1 files changed, 24 insertions, 45 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index 00d072e319b1..3270d81e5807 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -80,25 +80,20 @@ static char *options = NULL; static int flags = 0; static int forceflag = 0; -int main __P((int, char *[])); - -static int checkfs __P((const char *, const char *, const char *, char *, - pid_t *)); -static int selected __P((const char *)); -static void addoption __P((char *)); -static const char *getoptions __P((const char *)); -static void addentry __P((struct fstypelist *, const char *, const char *)); -static void maketypelist __P((char *)); -static void catopt __P((char **, const char *)); -static void mangle __P((char *, int *, const char ***, int *)); -static const char *getfslab __P((const char *)); -static void usage __P((void)); -static int isok __P((struct fstab *)); +static int checkfs(const char *, const char *, const char *, char *, pid_t *); +static int selected(const char *); +static void addoption(char *); +static const char *getoptions(const char *); +static void addentry(struct fstypelist *, const char *, const char *); +static void maketypelist(char *); +static void catopt(char **, const char *); +static void mangle(char *, int *, const char ***, int *); +static const char *getfslab(const char *); +static void usage(void) __dead2; +static int isok(struct fstab *); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct fstab *fs; int i, rval = 0; @@ -230,8 +225,7 @@ main(argc, argv) static int -isok(fs) - struct fstab *fs; +isok(struct fstab *fs) { int i; @@ -283,10 +277,8 @@ isok(fs) static int -checkfs(pvfstype, spec, mntpt, auxopt, pidp) - const char *pvfstype, *spec, *mntpt; - char *auxopt; - pid_t *pidp; +checkfs(const char *pvfstype, const char *spec, const char *mntpt, + char *auxopt, pid_t *pidp) { /* List of directories containing fsck_xxx subcommands. */ static const char *edirs[] = { @@ -416,8 +408,7 @@ checkfs(pvfstype, spec, mntpt, auxopt, pidp) static int -selected(type) - const char *type; +selected(const char *type) { struct entry *e; @@ -431,8 +422,7 @@ selected(type) static const char * -getoptions(type) - const char *type; +getoptions(const char *type) { struct entry *e; @@ -444,8 +434,7 @@ getoptions(type) static void -addoption(optstr) - char *optstr; +addoption(char *optstr) { char *newoptions; struct entry *e; @@ -465,10 +454,7 @@ addoption(optstr) static void -addentry(list, type, opts) - struct fstypelist *list; - const char *type; - const char *opts; +addentry(struct fstypelist *list, const char *type, const char *opts) { struct entry *e; @@ -480,8 +466,7 @@ addentry(list, type, opts) static void -maketypelist(fslist) - char *fslist; +maketypelist(char *fslist) { char *ptr; @@ -502,9 +487,7 @@ maketypelist(fslist) static void -catopt(sp, o) - char **sp; - const char *o; +catopt(char **sp, const char *o) { char *s; size_t i, j; @@ -522,10 +505,7 @@ catopt(sp, o) static void -mangle(options, argcp, argvp, maxargcp) - char *options; - int *argcp, *maxargcp; - const char ***argvp; +mangle(char *options, int *argcp, const char ***argvp, int *maxargcp) { char *p, *s; int argc, maxargc; @@ -563,8 +543,7 @@ mangle(options, argcp, argvp, maxargcp) const static char * -getfslab(str) - const char *str; +getfslab(const char *str) { struct disklabel dl; int fd; @@ -599,7 +578,7 @@ getfslab(str) static void -usage() +usage(void) { extern char *__progname; static const char common[] = |