aboutsummaryrefslogtreecommitdiff
path: root/amd/amfs_toplvl.c
diff options
context:
space:
mode:
Diffstat (limited to 'amd/amfs_toplvl.c')
-rw-r--r--amd/amfs_toplvl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/amd/amfs_toplvl.c b/amd/amfs_toplvl.c
index 1b968f197f55..1b143157b4c7 100644
--- a/amd/amfs_toplvl.c
+++ b/amd/amfs_toplvl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 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.
@@ -16,11 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -148,7 +144,7 @@ amfs_toplvl_init(mntfs *mf)
{
int error = 0;
-#if defined(MNT2_GEN_OPT_FORCE) || defined(MNT2_GEN_OPT_DETACH)
+#if (defined(MNT2_GEN_OPT_FORCE) || defined(MNT2_GEN_OPT_DETACH)) && (defined(HAVE_UVMOUNT) || defined(HAVE_UMOUNT2))
if (gopt.flags & CFM_FORCED_UNMOUNTS) {
plog(XLOG_INFO, "amfs_toplvl_init: trying forced/lazy unmount of %s",
mf->mf_mount);
@@ -158,7 +154,7 @@ amfs_toplvl_init(mntfs *mf)
else
dlog("amfs_toplvl_init: forced/lazy unmount succeeded");
}
-#endif /* MNT2_GEN_OPT_FORCE || MNT2_GEN_OPT_DETACH */
+#endif /* (MNT2_GEN_OPT_FORCE || MNT2_GEN_OPT_DETACH) && (HAVE_UVMOUNT || HAVE_UMOUNT2) */
return error;
}
@@ -227,6 +223,11 @@ amfs_toplvl_mount(am_node *mp, mntfs *mf)
xstrlcat(opts, toplvl_opts, sizeof(opts));
}
+#ifdef MNTTAB_OPT_NOLOCK
+ xstrlcat(opts, ",", sizeof(opts));
+ xstrlcat(opts, MNTTAB_OPT_NOLOCK, sizeof(opts));
+#endif /* MNTTAB_OPT_NOLOCK */
+
#ifdef MNTTAB_OPT_NOAC
if (gopt.auto_attrcache == 0) {
xstrlcat(opts, ",", sizeof(opts));