Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs use NFS_MAXNAMLEN for all names.



details:   https://anonhg.NetBSD.org/src/rev/69207b221706
branches:  trunk
changeset: 769925:69207b221706
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Sep 27 01:07:38 2011 +0000

description:
use NFS_MAXNAMLEN for all names.

diffstat:

 sys/nfs/nfs_bio.c    |  8 ++++----
 sys/nfs/nfs_export.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (66 lines):

diff -r fc16bfd5d353 -r 69207b221706 sys/nfs/nfs_bio.c
--- a/sys/nfs/nfs_bio.c Tue Sep 27 01:05:08 2011 +0000
+++ b/sys/nfs/nfs_bio.c Tue Sep 27 01:07:38 2011 +0000
@@ -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 @@
 
            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 @@
                                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;
diff -r fc16bfd5d353 -r 69207b221706 sys/nfs/nfs_export.c
--- a/sys/nfs/nfs_export.c      Tue Sep 27 01:05:08 2011 +0000
+++ b/sys/nfs/nfs_export.c      Tue Sep 27 01:07:38 2011 +0000
@@ -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 @@
         * 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.



Home | Main Index | Thread Index | Old Index