summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2012-12-02 01:16:04 +0000
committerrmacklem <rmacklem@FreeBSD.org>2012-12-02 01:16:04 +0000
commitd79bf0f49f345b1a785c3dab710f032fd51ab28e (patch)
treea690246f6cf6e94772ffc11582b8695fff296c48 /sys/nfs
parentfd7b9e3752e161a90b2d9740f7c6a7f54a0780f1 (diff)
downloadFreeBSD-src-d79bf0f49f345b1a785c3dab710f032fd51ab28e.zip
FreeBSD-src-d79bf0f49f345b1a785c3dab710f032fd51ab28e.tar.gz
Add an nfssvc() option to the kernel for the new NFS client
which dumps out the actual options being used by an NFS mount. This will be used to implement a "-m" option for nfsstat(1). Reviewed by: alfred MFC after: 2 weeks
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_nfssvc.c4
-rw-r--r--sys/nfs/nfssvc.h8
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/nfs/nfs_nfssvc.c b/sys/nfs/nfs_nfssvc.c
index 25dfee8..3f925a1 100644
--- a/sys/nfs/nfs_nfssvc.c
+++ b/sys/nfs/nfs_nfssvc.c
@@ -91,8 +91,8 @@ sys_nfssvc(struct thread *td, struct nfssvc_args *uap)
if ((uap->flag & (NFSSVC_ADDSOCK | NFSSVC_OLDNFSD | NFSSVC_NFSD)) &&
nfsd_call_nfsserver != NULL)
error = (*nfsd_call_nfsserver)(td, uap);
- else if ((uap->flag & (NFSSVC_CBADDSOCK | NFSSVC_NFSCBD)) &&
- nfsd_call_nfscl != NULL)
+ else if ((uap->flag & (NFSSVC_CBADDSOCK | NFSSVC_NFSCBD |
+ NFSSVC_DUMPMNTOPTS)) && nfsd_call_nfscl != NULL)
error = (*nfsd_call_nfscl)(td, uap);
else if ((uap->flag & (NFSSVC_IDNAME | NFSSVC_GETSTATS |
NFSSVC_GSSDADDPORT | NFSSVC_GSSDADDFIRST | NFSSVC_GSSDDELETEALL |
diff --git a/sys/nfs/nfssvc.h b/sys/nfs/nfssvc.h
index 6e636d5..65b1681 100644
--- a/sys/nfs/nfssvc.h
+++ b/sys/nfs/nfssvc.h
@@ -68,5 +68,13 @@
#define NFSSVC_ZEROSRVSTATS 0x02000000 /* modifier for GETSTATS */
#define NFSSVC_SUSPENDNFSD 0x04000000
#define NFSSVC_RESUMENFSD 0x08000000
+#define NFSSVC_DUMPMNTOPTS 0x10000000
+
+/* Argument structure for NFSSVC_DUMPMNTOPTS. */
+struct nfscl_dumpmntopts {
+ char *ndmnt_fname; /* File Name */
+ size_t ndmnt_blen; /* Size of buffer */
+ void *ndmnt_buf; /* and the buffer */
+};
#endif /* _NFS_NFSSVC_H */
OpenPOWER on IntegriCloud