Module Name:    src
Committed By:   christos
Date:           Tue Sep 27 01:07:38 UTC 2011

Modified Files:
        src/sys/nfs: nfs_bio.c nfs_export.c

Log Message:
use NFS_MAXNAMLEN for all names.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/nfs/nfs_bio.c
cvs rdiff -u -r1.50 -r1.51 src/sys/nfs/nfs_export.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/nfs/nfs_bio.c
diff -u src/sys/nfs/nfs_bio.c:1.187 src/sys/nfs/nfs_bio.c:1.188
--- src/sys/nfs/nfs_bio.c:1.187	Sat Jun 18 22:42:53 2011
+++ src/sys/nfs/nfs_bio.c	Mon Sep 26 21:07:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $	*/
+/*	$NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_nfs.h"
@@ -177,7 +177,7 @@ nfs_bioread(struct vnode *vp, struct uio
 
 	    case VLNK:
 		nfsstats.biocache_readlinks++;
-		bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, l);
+		bp = nfs_getcacheblk(vp, (daddr_t)0, MAXPATHLEN, l);
 		if (!bp)
 			return (EINTR);
 		if ((bp->b_oflags & BO_DONE) == 0) {
@@ -188,7 +188,7 @@ nfs_bioread(struct vnode *vp, struct uio
 				return (error);
 			}
 		}
-		n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid);
+		n = MIN(uio->uio_resid, MAXPATHLEN - bp->b_resid);
 		got_buf = 1;
 		on = 0;
 		break;

Index: src/sys/nfs/nfs_export.c
diff -u src/sys/nfs/nfs_export.c:1.50 src/sys/nfs/nfs_export.c:1.51
--- src/sys/nfs/nfs_export.c:1.50	Thu Mar 31 15:40:53 2011
+++ src/sys/nfs/nfs_export.c	Mon Sep 26 21:07:38 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_export.c,v 1.50 2011/03/31 19:40:53 dyoung Exp $	*/
+/*	$NetBSD: nfs_export.c,v 1.51 2011/09/27 01:07:38 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.50 2011/03/31 19:40:53 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.51 2011/09/27 01:07:38 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -783,9 +783,9 @@ setpublicfs(struct mount *mp, struct net
 	 * If an indexfile was specified, pull it in.
 	 */
 	if (argp->ex_indexfile != NULL) {
-		nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP, M_WAITOK);
+		nfs_pub.np_index = malloc(NFS_MAXNAMLEN + 1, M_TEMP, M_WAITOK);
 		error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
-		    MAXNAMLEN, (size_t *)0);
+		    NFS_MAXNAMLEN, (size_t *)0);
 		if (!error) {
 			/*
 			 * Check for illegal filenames.

Reply via email to