diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-01-16 06:40:24 +0000 |
commit | 315054f4737a39489e0a14f3a92bff61f1592832 (patch) | |
tree | 62bf010653374ce09b6beb4dfa0414a91457233b /sbin/fsck/fsck.c | |
parent | 79e3d817585ca08a91e30ad14abe43e2ab70295f (diff) |
Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)
Diffstat (limited to 'sbin/fsck/fsck.c')
-rw-r--r-- | sbin/fsck/fsck.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c index a006cd9c838..6ce454391bf 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsck.c,v 1.32 2014/10/17 06:33:35 deraadt Exp $ */ +/* $OpenBSD: fsck.c,v 1.33 2015/01/16 06:39:57 deraadt Exp $ */ /* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */ /* @@ -35,7 +35,7 @@ * */ -#include <sys/param.h> +#include <sys/types.h> #include <sys/mount.h> #include <sys/queue.h> #include <sys/resource.h> @@ -49,6 +49,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include <util.h> #include "pathnames.h" @@ -243,7 +244,7 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, const char **argv, **edir; pid_t pid; int argc, i, status, maxargc; - char *optbuf = NULL, fsname[MAXPATHLEN], execname[MAXPATHLEN]; + char *optbuf = NULL, fsname[PATH_MAX], execname[PATH_MAX]; const char *extra = getoptions(vfstype); if (strcmp(vfstype, "ufs") == 0) |