Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/tmpfs define and use TMPFS_MAXNAMLEN instead of MAXNA...
details: https://anonhg.NetBSD.org/src/rev/67bdb26b1914
branches: trunk
changeset: 769927:67bdb26b1914
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 27 01:10:43 2011 +0000
description:
define and use TMPFS_MAXNAMLEN instead of MAXNAMLEN
diffstat:
sys/fs/tmpfs/tmpfs.h | 5 +++--
sys/fs/tmpfs/tmpfs_vfsops.c | 6 +++---
sys/fs/tmpfs/tmpfs_vnops.c | 6 +++---
3 files changed, 9 insertions(+), 8 deletions(-)
diffs (74 lines):
diff -r ef441af1c9ef -r 67bdb26b1914 sys/fs/tmpfs/tmpfs.h
--- a/sys/fs/tmpfs/tmpfs.h Tue Sep 27 01:08:55 2011 +0000
+++ b/sys/fs/tmpfs/tmpfs.h Tue Sep 27 01:10:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs.h,v 1.44 2011/05/29 22:29:06 rmind Exp $ */
+/* $NetBSD: tmpfs.h,v 1.45 2011/09/27 01:10:43 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -63,8 +63,9 @@
#if defined(_KERNEL)
+#define TMPFS_MAXNAMLEN 255
/* Validate maximum td_namelen length. */
-CTASSERT(MAXNAMLEN < UINT16_MAX);
+CTASSERT(TMPFS_MAXNAMLEN < UINT16_MAX);
#define TMPFS_DIRCOOKIE_DOT 0
#define TMPFS_DIRCOOKIE_DOTDOT 1
diff -r ef441af1c9ef -r 67bdb26b1914 sys/fs/tmpfs/tmpfs_vfsops.c
--- a/sys/fs/tmpfs/tmpfs_vfsops.c Tue Sep 27 01:08:55 2011 +0000
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c Tue Sep 27 01:10:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vfsops.c,v 1.51 2011/05/29 22:29:07 rmind Exp $ */
+/* $NetBSD: tmpfs_vfsops.c,v 1.52 2011/09/27 01:10:43 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.51 2011/05/29 22:29:07 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.52 2011/09/27 01:10:43 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -181,7 +181,7 @@
mp->mnt_data = tmp;
mp->mnt_flag |= MNT_LOCAL;
- mp->mnt_stat.f_namemax = MAXNAMLEN;
+ mp->mnt_stat.f_namemax = TMPFS_MAXNAMLEN;
mp->mnt_fs_bshift = PAGE_SHIFT;
mp->mnt_dev_bshift = DEV_BSHIFT;
mp->mnt_iflag |= IMNT_MPSAFE;
diff -r ef441af1c9ef -r 67bdb26b1914 sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c Tue Sep 27 01:08:55 2011 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c Tue Sep 27 01:10:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vnops.c,v 1.90 2011/08/27 15:32:28 hannken Exp $ */
+/* $NetBSD: tmpfs_vnops.c,v 1.91 2011/09/27 01:10:43 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.90 2011/08/27 15:32:28 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.91 2011/09/27 01:10:43 christos Exp $");
#include <sys/param.h>
#include <sys/dirent.h>
@@ -1119,7 +1119,7 @@
* we can't sleep, hence the early allocation above.
*/
if (newname != NULL) {
- KASSERT(tcnp->cn_namelen <= MAXNAMLEN);
+ KASSERT(tcnp->cn_namelen <= TMPFS_MAXNAMLEN);
tmpfs_strname_free(tmpfs, fde->td_name, fde->td_namelen);
fde->td_namelen = (uint16_t)tcnp->cn_namelen;
Home |
Main Index |
Thread Index |
Old Index