From d79bf0f49f345b1a785c3dab710f032fd51ab28e Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sun, 2 Dec 2012 01:16:04 +0000 Subject: 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 --- sys/nfs/nfs_nfssvc.c | 4 ++-- sys/nfs/nfssvc.h | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/nfs') 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 */ -- cgit v1.1