Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Nodes cannot use the '0' identifier or they will be skipped ...
details: https://anonhg.NetBSD.org/src/rev/bc8c40112bf7
branches: trunk
changeset: 584343:bc8c40112bf7
user: jmmv <jmmv%NetBSD.org@localhost>
date: Tue Sep 13 21:30:52 2005 +0000
description:
Nodes cannot use the '0' identifier or they will be skipped by readdir.
E.g., the root node's '.' and '..' directory entries did not appear in
a directory list, because the root node always holds the first id.
diffstat:
regress/sys/fs/tmpfs/t_readdir | 6 +++++-
sys/fs/tmpfs/tmpfs_vfsops.c | 6 +++---
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (49 lines):
diff -r 028c5348d2e3 -r bc8c40112bf7 regress/sys/fs/tmpfs/t_readdir
--- a/regress/sys/fs/tmpfs/t_readdir Tue Sep 13 20:09:55 2005 +0000
+++ b/regress/sys/fs/tmpfs/t_readdir Tue Sep 13 21:30:52 2005 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: t_readdir,v 1.1 2005/09/10 19:20:51 jmmv Exp $
+# $NetBSD: t_readdir,v 1.2 2005/09/13 21:30:52 jmmv Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -44,6 +44,10 @@
test_run() {
test_mount
+ test_name "Directory has '.' and '..' entries"
+ /bin/ls -a | grep '^\.$' >/dev/null || die
+ /bin/ls -a | grep '^\..$' >/dev/null || die
+
test_name "Creation of files of all possible types"
mkdir dir || die
touch reg || die
diff -r 028c5348d2e3 -r bc8c40112bf7 sys/fs/tmpfs/tmpfs_vfsops.c
--- a/sys/fs/tmpfs/tmpfs_vfsops.c Tue Sep 13 20:09:55 2005 +0000
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c Tue Sep 13 21:30:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vfsops.c,v 1.2 2005/09/10 22:28:57 jmmv Exp $ */
+/* $NetBSD: tmpfs_vfsops.c,v 1.3 2005/09/13 21:30:52 jmmv Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.2 2005/09/10 22:28:57 jmmv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.3 2005/09/13 21:30:52 jmmv Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -163,7 +163,7 @@
KASSERT(tmp != NULL);
tmp->tm_nodes_max = nodes;
- tmp->tm_nodes_last = 0;
+ tmp->tm_nodes_last = 1;
LIST_INIT(&tmp->tm_nodes_used);
LIST_INIT(&tmp->tm_nodes_avail);
Home |
Main Index |
Thread Index |
Old Index