Module Name: src Committed By: christos Date: Tue Sep 27 01:23:05 UTC 2011
Modified Files: src/sys/miscfs/kernfs: kernfs.h kernfs_vfsops.c Log Message: define KERNFS_MAXNAMLEN and use it.` To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/miscfs/kernfs/kernfs.h cvs rdiff -u -r1.90 -r1.91 src/sys/miscfs/kernfs/kernfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/miscfs/kernfs/kernfs.h diff -u src/sys/miscfs/kernfs/kernfs.h:1.35 src/sys/miscfs/kernfs/kernfs.h:1.36 --- src/sys/miscfs/kernfs/kernfs.h:1.35 Sat Jan 10 21:45:53 2009 +++ src/sys/miscfs/kernfs/kernfs.h Mon Sep 26 21:23:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kernfs.h,v 1.35 2009/01/11 02:45:53 christos Exp $ */ +/* $NetBSD: kernfs.h,v 1.36 2011/09/27 01:23:05 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -119,6 +119,8 @@ struct kernfs_mount { #define VTOKERN(vp) ((struct kernfs_node *)(vp)->v_data) #define KERNFSTOV(kfs) ((kfs)->kfs_vnode) +#define KERNFS_MAXNAMLEN 255 + extern const struct kern_target kern_targets[]; extern int nkern_targets; extern const int static_nkern_targets; Index: src/sys/miscfs/kernfs/kernfs_vfsops.c diff -u src/sys/miscfs/kernfs/kernfs_vfsops.c:1.90 src/sys/miscfs/kernfs/kernfs_vfsops.c:1.91 --- src/sys/miscfs/kernfs/kernfs_vfsops.c:1.90 Mon Nov 30 05:59:20 2009 +++ src/sys/miscfs/kernfs/kernfs_vfsops.c Mon Sep 26 21:23:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kernfs_vfsops.c,v 1.90 2009/11/30 10:59:20 pooka Exp $ */ +/* $NetBSD: kernfs_vfsops.c,v 1.91 2011/09/27 01:23:05 christos Exp $ */ /* * Copyright (c) 1992, 1993, 1995 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.90 2009/11/30 10:59:20 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kernfs_vfsops.c,v 1.91 2011/09/27 01:23:05 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -145,7 +145,7 @@ kernfs_mount(struct mount *mp, const cha fmp = malloc(sizeof(struct kernfs_mount), M_KERNFSMNT, M_WAITOK|M_ZERO); TAILQ_INIT(&fmp->nodelist); - mp->mnt_stat.f_namemax = MAXNAMLEN; + mp->mnt_stat.f_namemax = KERNFS_MAXNAMLEN; mp->mnt_flag |= MNT_LOCAL; mp->mnt_data = fmp; vfs_getnewfsid(mp);