summaryrefslogtreecommitdiffstats
path: root/contrib/amd/amd/ops_TEMPLATE.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd/amd/ops_TEMPLATE.c')
-rw-r--r--contrib/amd/amd/ops_TEMPLATE.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/contrib/amd/amd/ops_TEMPLATE.c b/contrib/amd/amd/ops_TEMPLATE.c
index dcec280..3f74219 100644
--- a/contrib/amd/amd/ops_TEMPLATE.c
+++ b/contrib/amd/amd/ops_TEMPLATE.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2004 Erez Zadok
+ * Copyright (c) 1997-2006 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -36,9 +36,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * %W% (Berkeley) %G%
*
- * $Id: ops_TEMPLATE.c,v 1.3.2.5 2004/01/06 03:15:16 ezk Exp $
+ * File: am-utils/amd/ops_TEMPLATE.c
*
*/
@@ -62,16 +61,14 @@
/* forward declarations */
static char *foofs_match(am_opts *fo);
static int foofs_init(mntfs *mf);
-static int foofs_mount(am_node *mp);
-static int foofs_fmount(mntfs *mf);
-static int foofs_umount(am_node *mp);
-static int foofs_fumount(mntfs *mf);
+static int foofs_mount(am_node *mp, mntfs *mf);
+static int foofs_umount(am_node *mp, mntfs *mf);
static am_node *foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
-static int foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count);
+static int foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count);
static am_node *foofs_readlink(am_node *mp, int *error_return);
-static void foofs_mounted(mntfs *mf);
-static void foofs_umounted(am_node *mp);
-fserver *foofs_ffserver(mntfs *mf);
+static void foofs_mounted(am_node *am, mntfs *mf);
+static void foofs_umounted(am_node *mp, mntfs *mf);
+static fserver *foofs_ffserver(mntfs *mf);
/*
@@ -84,16 +81,19 @@ am_ops foofs_ops =
foofs_match, /* match */
foofs_init, /* initialize */
foofs_mount, /* mount vnode */
- foofs_fmount, /* mount vfs */
foofs_umount, /* unmount vnode */
- foofs_fumount, /* unmount VFS */
- foofs_lookuppn, /* lookup path-name */
+ foofs_lookup_child, /* lookup path-name */
+ foofs_mount_child, /* mount path-name */
foofs_readdir, /* read directory */
foofs_readlink, /* read link */
foofs_mounted, /* after-mount extra actions */
foofs_umounted, /* after-umount extra actions */
foofs_ffserver, /* find a file server */
- FS_MKMNT | FS_BACKGROUND | FS_AMQINFO /* flags */
+ foofs_get_wchan, /* return the waiting channel */
+ FS_MKMNT | FS_BACKGROUND | FS_AMQINFO, /* nfs_fs_flags */
+#ifdef HAVE_FS_AUTOFS
+ AUTOFS_TEMPLATE_FS_FLAGS,
+#endif /* HAVE_FS_AUTOFS */
};
@@ -220,7 +220,7 @@ foofs_lookuppn(am_node *mp, char *fname, int *error_return, int op)
* If OK, fills in ep with chain of directory entries.
*/
static int
-foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count)
+foofs_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count)
{
int error = 0;
@@ -284,10 +284,22 @@ foofs_umounted(am_node *mp)
* Find a file server.
* Returns: fserver of found server, or NULL if not found.
*/
-fserver *
+static fserver *
foofs_ffserver(mntfs *mf)
{
plog(XLOG_INFO, "entering foofs_ffserver...");
return NULL;
}
+
+
+/*
+ * Normally just return mf. Only inherit needs to do special tricks.
+ */
+static wchan_t *
+foofs_get_wchan(mntfs *mf)
+{
+ plog(XLOG_INFO, "entering foofs_get_wchan...");
+
+ return mf;
+}
OpenPOWER on IntegriCloud