Do set f_namemax at mount, to provide sensible value for statvfs(2)

calls.
This commit is contained in:
njoly 2010-07-07 16:19:55 +00:00
parent 6218b6cbdb
commit a28e233447
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysvbfs_vfsops.c,v 1.32 2010/06/24 13:03:10 hannken Exp $ */
/* $NetBSD: sysvbfs_vfsops.c,v 1.33 2010/07/07 16:19:55 njoly Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.32 2010/06/24 13:03:10 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.33 2010/07/07 16:19:55 njoly Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -202,6 +202,7 @@ sysvbfs_mountfs(struct vnode *devvp, struct mount *mp, struct lwp *l)
mp->mnt_stat.f_fsidx.__fsid_val[0] = (long)devvp->v_rdev;
mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_SYSVBFS);
mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
mp->mnt_stat.f_namemax = BFS_FILENAME_MAXLEN;
mp->mnt_flag |= MNT_LOCAL;
mp->mnt_dev_bshift = BFS_BSHIFT;
mp->mnt_fs_bshift = BFS_BSHIFT;