* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* FreeBSD-Id: nfs_vfsops.c,v 1.52 1997/11/12 05:42:21 julian Exp $
*/
+
+#include <nfs/nfs_conf.h>
+#if CONFIG_NFS_CLIENT
+
/*
* NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
* support for mandatory and extensible security protections. This notice
* Return an NFS volume name from the mntfrom name.
*/
static void
-nfs_get_volname(struct mount *mp, char *volname, size_t len, vfs_context_t ctx)
+nfs_get_volname(struct mount *mp, char *volname, size_t len, __unused vfs_context_t ctx)
{
const char *ptr, *cptr;
const char *mntfrom = mp->mnt_vfsstat.f_mntfromname;
- struct nfsmount *nmp = VFSTONFS(mp);
size_t mflen;
nmp->nm_iodlink.tqe_next = NFSNOLIST;
nmp->nm_deadtimeout = 0;
nmp->nm_curdeadtimeout = 0;
+ NFS_BITMAP_SET(nmp->nm_flags, NFS_MFLAG_RDIRPLUS); /* enable RDIRPLUS by default. It will be reverted later in case NFSv2 is used */
NFS_BITMAP_SET(nmp->nm_flags, NFS_MFLAG_NOACL);
nmp->nm_realm = NULL;
nmp->nm_principal = NULL;
struct netfs_status *nsp = NULL;
int timeoutmask;
uint totlen, count, numThreads;
-#if NFSSERVER
+#if CONFIG_NFS_SERVER
uint pos;
struct nfs_exportfs *nxfs;
struct nfs_export *nx;
struct nfs_user_stat_path_rec upath_rec;
uint bytes_avail, bytes_total, recs_copied;
uint numExports, numRecs;
-#endif /* NFSSERVER */
+#endif /* CONFIG_NFS_SERVER */
/*
* All names at this level are terminal.
*oldlenp = xb.xb_u.xb_buffer.xbb_len;
xb_cleanup(&xb);
break;
-#if NFSSERVER
+#if CONFIG_NFS_SERVER
case NFS_EXPORTSTATS:
/* setup export stat descriptor */
stat_desc.rec_vers = NFS_EXPORT_STAT_REC_VERSION;
error = copyout(&nfsrv_user_stat_node_count, oldp, sizeof(nfsrv_user_stat_node_count));
break;
-#endif /* NFSSERVER */
+#endif /* CONFIG_NFS_SERVER */
case VFS_CTL_NOLOCKS:
if (req->oldptr != USER_ADDR_NULL) {
lck_mtx_lock(&nmp->nm_lock);
}
return error;
}
+
+#endif /* CONFIG_NFS_CLIENT */