diff options
Diffstat (limited to 'contrib/amd/amd/amfs_error.c')
-rw-r--r-- | contrib/amd/amd/amfs_error.c | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/contrib/amd/amd/amfs_error.c b/contrib/amd/amd/amfs_error.c index ca62033..51bdaa6 100644 --- a/contrib/amd/amd/amfs_error.c +++ b/contrib/amd/amd/amfs_error.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2004 Erez Zadok + * Copyright (c) 1997-2006 Erez Zadok * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine * Copyright (c) 1989 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_error.c,v 1.3.2.5 2004/01/06 03:15:16 ezk Exp $ + * File: am-utils/amd/amfs_error.c * */ @@ -57,9 +56,8 @@ #include <amd.h> static char *amfs_error_match(am_opts *fo); -static int amfs_error_fmount(mntfs *mf); -static int amfs_error_fumount(mntfs *mf); -static void amfs_error_umounted(am_node *mp); +static int amfs_error_mount(am_node *am, mntfs *mf); +static int amfs_error_umount(am_node *am, mntfs *mf); /* @@ -70,17 +68,20 @@ am_ops amfs_error_ops = "error", amfs_error_match, 0, /* amfs_error_init */ - amfs_auto_fmount, - amfs_error_fmount, - amfs_auto_fumount, - amfs_error_fumount, - amfs_error_lookuppn, + amfs_error_mount, + amfs_error_umount, + amfs_error_lookup_child, + amfs_error_mount_child, amfs_error_readdir, 0, /* amfs_error_readlink */ 0, /* amfs_error_mounted */ - amfs_error_umounted, - find_amfs_auto_srvr, - FS_DISCARD + 0, /* amfs_error_umounted */ + amfs_generic_find_srvr, + 0, /* amfs_error_get_wchan */ + FS_DISCARD, /* nfs_fs_flags */ +#ifdef HAVE_FS_AUTOFS + AUTOFS_ERROR_FS_FLAGS, +#endif /* HAVE_FS_AUTOFS */ }; @@ -96,14 +97,14 @@ amfs_error_match(am_opts *fo) static int -amfs_error_fmount(mntfs *mf) +amfs_error_mount(am_node *am, mntfs *mf) { return ENOENT; } static int -amfs_error_fumount(mntfs *mf) +amfs_error_umount(am_node *am, mntfs *mf) { /* * Always succeed @@ -118,7 +119,7 @@ amfs_error_fumount(mntfs *mf) * If we do then just give an error. */ am_node * -amfs_error_lookuppn(am_node *mp, char *fname, int *error_return, int op) +amfs_error_lookup_child(am_node *mp, char *fname, int *error_return, int op) { *error_return = ESTALE; return 0; @@ -126,25 +127,25 @@ amfs_error_lookuppn(am_node *mp, char *fname, int *error_return, int op) /* - * EFS interface to RPC readdir() routine. + * EFS interface to RPC lookup() routine. * Should never get here in the automounter. * If we do then just give an error. */ -int -amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count) +am_node * +amfs_error_mount_child(am_node *ap, int *error_return) { - return ESTALE; + *error_return = ESTALE; + return 0; } /* - * umounted() callback for EFS. - * - * This prevents core-dumps on callbacks to error file-systems from - * nfsx_fumount. + * EFS interface to RPC readdir() routine. + * Should never get here in the automounter. + * If we do then just give an error. */ -static void -amfs_error_umounted(am_node *mp) +int +amfs_error_readdir(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count) { - /* nothing to do */ + return ESTALE; } |