Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/puffs/h_dtfs support pathconf (more or less copypas...
details: https://anonhg.NetBSD.org/src/rev/968039ec97b8
branches: trunk
changeset: 756522:968039ec97b8
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Jul 21 06:58:25 2010 +0000
description:
support pathconf (more or less copypasted from ufs). for njoly's tests.
diffstat:
tests/fs/puffs/h_dtfs/dtfs.c | 3 +-
tests/fs/puffs/h_dtfs/dtfs_vnops.c | 43 +++++++++++++++++++++++++++++++++++++-
2 files changed, 44 insertions(+), 2 deletions(-)
diffs (74 lines):
diff -r d6ca8429704a -r 968039ec97b8 tests/fs/puffs/h_dtfs/dtfs.c
--- a/tests/fs/puffs/h_dtfs/dtfs.c Wed Jul 21 03:14:32 2010 +0000
+++ b/tests/fs/puffs/h_dtfs/dtfs.c Wed Jul 21 06:58:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtfs.c,v 1.1 2010/07/06 14:16:44 pooka Exp $ */
+/* $NetBSD: dtfs.c,v 1.2 2010/07/21 06:58:25 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@@ -206,6 +206,7 @@
PUFFSOP_SET(pops, dtfs, node, readlink);
PUFFSOP_SET(pops, dtfs, node, mknod);
PUFFSOP_SET(pops, dtfs, node, inactive);
+ PUFFSOP_SET(pops, dtfs, node, pathconf);
PUFFSOP_SET(pops, dtfs, node, reclaim);
srandom(time(NULL)); /* for random generation numbers */
diff -r d6ca8429704a -r 968039ec97b8 tests/fs/puffs/h_dtfs/dtfs_vnops.c
--- a/tests/fs/puffs/h_dtfs/dtfs_vnops.c Wed Jul 21 03:14:32 2010 +0000
+++ b/tests/fs/puffs/h_dtfs/dtfs_vnops.c Wed Jul 21 06:58:25 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dtfs_vnops.c,v 1.6 2010/07/14 21:24:40 pooka Exp $ */
+/* $NetBSD: dtfs_vnops.c,v 1.7 2010/07/21 06:58:25 pooka Exp $ */
/*
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
@@ -515,6 +515,47 @@
}
int
+dtfs_node_pathconf(struct puffs_usermount *pu, puffs_cookie_t opc,
+ int name, register_t *retval)
+{
+
+ switch (name) {
+ case _PC_LINK_MAX:
+ *retval = LINK_MAX;
+ return 0;
+ case _PC_NAME_MAX:
+ *retval = NAME_MAX;
+ return 0;
+ case _PC_PATH_MAX:
+ *retval = PATH_MAX;
+ return 0;
+ case _PC_PIPE_BUF:
+ *retval = PIPE_BUF;
+ return 0;
+ case _PC_CHOWN_RESTRICTED:
+ *retval = 1;
+ return 0;
+ case _PC_NO_TRUNC:
+ *retval = 1;
+ return 0;
+ case _PC_SYNC_IO:
+ *retval = 1;
+ return 0;
+ case _PC_FILESIZEBITS:
+ *retval = 43; /* this one goes to 11 */
+ return 0;
+ case _PC_SYMLINK_MAX:
+ *retval = MAXPATHLEN;
+ return 0;
+ case _PC_2_SYMLINKS:
+ *retval = 1;
+ return 0;
+ default:
+ return EINVAL;
+ }
+}
+
+int
dtfs_node_inactive(struct puffs_usermount *pu, puffs_cookie_t opc)
{
struct puffs_node *pn = opc;
Home |
Main Index |
Thread Index |
Old Index