summaryrefslogtreecommitdiffstats
path: root/contrib/amd/amd/amfs_direct.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd/amd/amfs_direct.c')
-rw-r--r--contrib/amd/amd/amfs_direct.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/contrib/amd/amd/amfs_direct.c b/contrib/amd/amd/amfs_direct.c
index 2ea0ae6..dbef743 100644
--- a/contrib/amd/amd/amfs_direct.c
+++ b/contrib/amd/amd/amfs_direct.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: amfs_direct.c,v 1.3.2.4 2004/01/06 03:15:16 ezk Exp $
+ * File: am-utils/amd/amfs_direct.c
*
*/
@@ -63,19 +62,22 @@ static am_node *amfs_direct_readlink(am_node *mp, int *error_return);
am_ops amfs_direct_ops =
{
"direct",
- amfs_auto_match,
+ amfs_generic_match,
0, /* amfs_direct_init */
amfs_toplvl_mount,
- 0,
amfs_toplvl_umount,
- 0,
- amfs_error_lookuppn,
+ amfs_generic_lookup_child,
+ amfs_generic_mount_child,
amfs_error_readdir,
amfs_direct_readlink,
- amfs_toplvl_mounted,
- 0, /* amfs_auto_umounted */
- find_amfs_auto_srvr,
- FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO
+ amfs_generic_mounted,
+ 0, /* amfs_direct_umounted */
+ amfs_generic_find_srvr,
+ 0, /* amfs_direct_get_wchan */
+ FS_DIRECT | FS_MKMNT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO,
+#ifdef HAVE_FS_AUTOFS
+ AUTOFS_DIRECT_FS_FLAGS,
+#endif /* HAVE_FS_AUTOFS */
};
@@ -92,8 +94,10 @@ amfs_direct_readlink(am_node *mp, int *error_return)
xp = next_nonerror_node(mp->am_child);
if (!xp) {
if (!mp->am_mnt->mf_private)
- amfs_auto_mkcacheref(mp->am_mnt); /* XXX */
- xp = amfs_auto_lookuppn(mp, mp->am_path + 1, &rc, VLOOK_CREATE);
+ amfs_mkcacheref(mp->am_mnt); /* XXX */
+ xp = amfs_generic_lookup_child(mp, mp->am_path + 1, &rc, VLOOK_CREATE);
+ if (xp && rc < 0)
+ xp = amfs_generic_mount_child(xp, &rc);
}
if (xp) {
new_ttl(xp); /* (7/12/89) from Rein Tollevik */
OpenPOWER on IntegriCloud