Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/examples/puffs/dtfs Reinstate the inactive operation (...
details: https://anonhg.NetBSD.org/src/rev/b66709458a51
branches: trunk
changeset: 756081:b66709458a51
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jul 06 13:56:40 2010 +0000
description:
Reinstate the inactive operation (mostly dummy). This makes -i
work again and henceforth makes it possible to test inactive.
diffstat:
share/examples/puffs/dtfs/dtfs.c | 3 ++-
share/examples/puffs/dtfs/dtfs_vnops.c | 12 +++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r dbe2c048d367 -r b66709458a51 share/examples/puffs/dtfs/dtfs.c
--- a/share/examples/puffs/dtfs/dtfs.c Tue Jul 06 13:47:47 2010 +0000
+++ b/share/examples/puffs/dtfs/dtfs.c Tue Jul 06 13:56:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtfs.c,v 1.41 2009/12/05 20:54:40 pooka Exp $ */
+/* $NetBSD: dtfs.c,v 1.42 2010/07/06 13:56:40 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@@ -205,6 +205,7 @@
PUFFSOP_SET(pops, dtfs, node, symlink);
PUFFSOP_SET(pops, dtfs, node, readlink);
PUFFSOP_SET(pops, dtfs, node, mknod);
+ PUFFSOP_SET(pops, dtfs, node, inactive);
PUFFSOP_SET(pops, dtfs, node, reclaim);
srandom(time(NULL)); /* for random generation numbers */
diff -r dbe2c048d367 -r b66709458a51 share/examples/puffs/dtfs/dtfs_vnops.c
--- a/share/examples/puffs/dtfs/dtfs_vnops.c Tue Jul 06 13:47:47 2010 +0000
+++ b/share/examples/puffs/dtfs/dtfs_vnops.c Tue Jul 06 13:56:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtfs_vnops.c,v 1.42 2007/12/19 14:01:30 pooka Exp $ */
+/* $NetBSD: dtfs_vnops.c,v 1.43 2010/07/06 13:56:40 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@@ -497,6 +497,16 @@
}
int
+dtfs_node_inactive(struct puffs_usermount *pu, puffs_cookie_t opc)
+{
+ struct puffs_node *pn = opc;
+
+ if (pn->pn_va.va_nlink == 0)
+ puffs_setback(puffs_cc_getcc(pu), PUFFS_SETBACK_NOREF_N1);
+ return 0;
+}
+
+int
dtfs_node_reclaim(struct puffs_usermount *pu, void *opc)
{
struct puffs_node *pn = opc;
Home |
Main Index |
Thread Index |
Old Index