summaryrefslogtreecommitdiffstats
path: root/sbin/mount_ffs
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
committerderaadt <deraadt@openbsd.org>2015-01-16 06:39:28 +0000
commitb9fc9a728fce9c4289b7e9a992665e28d5629a54 (patch)
tree72b2433e418dfa1aef5fcf8305617b97979a25d8 /sbin/mount_ffs
parentimprove checksum parsing slightly. now handles filenames with spaces. (diff)
downloadwireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.tar.xz
wireguard-openbsd-b9fc9a728fce9c4289b7e9a992665e28d5629a54.zip
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/mount_ffs')
-rw-r--r--sbin/mount_ffs/mount_ffs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/mount_ffs/mount_ffs.c b/sbin/mount_ffs/mount_ffs.c
index 02bf63460a7..ddea908fc0b 100644
--- a/sbin/mount_ffs/mount_ffs.c
+++ b/sbin/mount_ffs/mount_ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_ffs.c,v 1.20 2009/10/27 23:59:33 deraadt Exp $ */
+/* $OpenBSD: mount_ffs.c,v 1.21 2015/01/16 06:39:59 deraadt Exp $ */
/* $NetBSD: mount_ffs.c,v 1.3 1996/04/13 01:31:19 jtc Exp $ */
/*-
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/mount.h>
#include <err.h>
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <limits.h>
#include "mntopts.h"
@@ -60,7 +61,7 @@ main(int argc, char *argv[])
{
struct ufs_args args; /* XXX ffs_args */
int ch, mntflags;
- char fs_name[MAXPATHLEN], *errcause;
+ char fs_name[PATH_MAX], *errcause;
mntflags = 0;
optind = optreset = 1; /* Reset for parse of new argv. */