diff options
author | wollman <wollman@FreeBSD.org> | 1994-09-22 22:10:49 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-09-22 22:10:49 +0000 |
commit | d8d853f4faa49b727dd68f09116d9978dea80f30 (patch) | |
tree | c43434ec2d5649116c2c25d2a3bae6252459a4ba /sys/nfs/nfs_subs.c | |
parent | 66d4416828530fb477c0acb17362f18714151de3 (diff) | |
download | FreeBSD-src-d8d853f4faa49b727dd68f09116d9978dea80f30.zip FreeBSD-src-d8d853f4faa49b727dd68f09116d9978dea80f30.tar.gz |
Make NFS loadable.
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r-- | sys/nfs/nfs_subs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 4f6d7e7..cb52f5d 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -52,6 +52,10 @@ #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/stat.h> +#ifdef VFS_LKM +#include <sys/sysent.h> +#include <sys/syscall.h> +#endif #include <nfs/rpcv2.h> #include <nfs/nfsv2.h> @@ -97,6 +101,13 @@ extern int nqsrv_clockskew; extern int nqsrv_writeslack; extern int nqsrv_maxlease; +#ifdef VFS_LKM +struct getfh_args; +extern int getfh(struct proc *, struct getfh_args *, int *); +struct nfssvc_args; +extern int nfssvc(struct proc *, struct nfssvc_args *, int *); +#endif + /* * Create the header for an rpc request packet * The hsiz is the size of the rest of the nfs request header. @@ -634,6 +645,20 @@ nfs_init() nfsreqh.r_prev = nfsreqh.r_next = &nfsreqh; nfs_timer(); + /* + * Set up lease_check and lease_updatetime so that other parts + * of the system can call us, if we are loadable. + */ + lease_check = nfs_lease_check; + lease_updatetime = nfs_lease_updatetime; + vfsconf[MOUNT_NFS]->vfc_refcount++; /* make us non-unloadable */ +#ifdef VFS_LKM + sysent[SYS_nfssvc].sy_narg = 2; + sysent[SYS_nfssvc].sy_call = nfssvc; + sysent[SYS_getfh].sy_narg = 2; + sysent[SYS_getfh].sy_call = getfh; +#endif + return (0); } |