X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..eb6b6ca394357805f2bdba989abae309f718b4d8:/bsd/nfs/nfs_vfsops.c?ds=sidebyside diff --git a/bsd/nfs/nfs_vfsops.c b/bsd/nfs/nfs_vfsops.c index 67b409bae..ef5457410 100644 --- a/bsd/nfs/nfs_vfsops.c +++ b/bsd/nfs/nfs_vfsops.c @@ -64,6 +64,10 @@ * @(#)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 +#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 @@ -526,11 +530,10 @@ nfsmout: * 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; @@ -3042,6 +3045,7 @@ mountnfs( 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; @@ -6183,7 +6187,7 @@ nfs_vfs_sysctl(int *name, u_int namelen, user_addr_t oldp, size_t *oldlenp, 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; @@ -6196,7 +6200,7 @@ nfs_vfs_sysctl(int *name, u_int namelen, user_addr_t oldp, size_t *oldlenp, 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. @@ -6304,7 +6308,7 @@ nfs_vfs_sysctl(int *name, u_int namelen, user_addr_t oldp, size_t *oldlenp, *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; @@ -6550,7 +6554,7 @@ ustat_skip: 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); @@ -6728,3 +6732,5 @@ ustat_skip: } return error; } + +#endif /* CONFIG_NFS_CLIENT */