make getfh a standard syscall instead of dependant on having
NFSSERVER defined, useful for userland fileservers that want to use a filehandle type interface to the filesystem. Submitted by: Assar Westerlund assar@stacken.kth.se PR: kern/15452
This commit is contained in:
parent
3ace5ae2c8
commit
20883b0f10
@ -248,7 +248,7 @@
|
||||
159 UNIMPL NOHIDE nosys
|
||||
160 UNIMPL NOHIDE nosys
|
||||
; 161 is initialized by the NFS code, if present.
|
||||
161 NOIMPL BSD { int getfh(char *fname, struct fhandle *fhp); }
|
||||
161 STD BSD { int getfh(char *fname, struct fhandle *fhp); }
|
||||
162 STD BSD { int getdomainname(char *domainname, int len); }
|
||||
163 STD BSD { int setdomainname(char *domainname, int len); }
|
||||
164 STD BSD { int uname(struct utsname *name); }
|
||||
|
@ -117,8 +117,6 @@ static sy_call_t *nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
|
||||
static vop_t *nfs_prev_vop_lease_check;
|
||||
static int nfs_prev_getfh_sy_narg;
|
||||
static sy_call_t *nfs_prev_getfh_sy_call;
|
||||
|
||||
/*
|
||||
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
|
||||
@ -558,8 +556,6 @@ extern nfstype nfsv3_type[9];
|
||||
extern struct nfsnodehashhead *nfsnodehashtbl;
|
||||
extern u_long nfsnodehash;
|
||||
|
||||
struct getfh_args;
|
||||
extern int getfh(struct proc *, struct getfh_args *, int *);
|
||||
struct nfssvc_args;
|
||||
extern int nfssvc(struct proc *, struct nfssvc_args *, int *);
|
||||
|
||||
@ -1184,12 +1180,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_nfssvc].sy_narg = 2;
|
||||
nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call;
|
||||
sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc;
|
||||
#ifndef NFS_NOSERVER
|
||||
nfs_prev_getfh_sy_narg = sysent[SYS_getfh].sy_narg;
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
nfs_prev_getfh_sy_call = sysent[SYS_getfh].sy_call;
|
||||
sysent[SYS_getfh].sy_call = (sy_call_t *)getfh;
|
||||
#endif
|
||||
|
||||
nfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
|
||||
@ -1209,10 +1199,6 @@ nfs_uninit(vfsp)
|
||||
lease_updatetime = nfs_prev_lease_updatetime;
|
||||
sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg;
|
||||
sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
sysent[SYS_getfh].sy_narg = nfs_prev_getfh_sy_narg;
|
||||
sysent[SYS_getfh].sy_call = nfs_prev_getfh_sy_call;
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,6 @@ static sy_call_t *nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
|
||||
static vop_t *nfs_prev_vop_lease_check;
|
||||
static int nfs_prev_getfh_sy_narg;
|
||||
static sy_call_t *nfs_prev_getfh_sy_call;
|
||||
|
||||
/*
|
||||
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
|
||||
@ -558,8 +556,6 @@ extern nfstype nfsv3_type[9];
|
||||
extern struct nfsnodehashhead *nfsnodehashtbl;
|
||||
extern u_long nfsnodehash;
|
||||
|
||||
struct getfh_args;
|
||||
extern int getfh(struct proc *, struct getfh_args *, int *);
|
||||
struct nfssvc_args;
|
||||
extern int nfssvc(struct proc *, struct nfssvc_args *, int *);
|
||||
|
||||
@ -1184,12 +1180,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_nfssvc].sy_narg = 2;
|
||||
nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call;
|
||||
sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc;
|
||||
#ifndef NFS_NOSERVER
|
||||
nfs_prev_getfh_sy_narg = sysent[SYS_getfh].sy_narg;
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
nfs_prev_getfh_sy_call = sysent[SYS_getfh].sy_call;
|
||||
sysent[SYS_getfh].sy_call = (sy_call_t *)getfh;
|
||||
#endif
|
||||
|
||||
nfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
|
||||
@ -1209,10 +1199,6 @@ nfs_uninit(vfsp)
|
||||
lease_updatetime = nfs_prev_lease_updatetime;
|
||||
sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg;
|
||||
sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
sysent[SYS_getfh].sy_narg = nfs_prev_getfh_sy_narg;
|
||||
sysent[SYS_getfh].sy_call = nfs_prev_getfh_sy_call;
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,6 @@ static sy_call_t *nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
|
||||
static vop_t *nfs_prev_vop_lease_check;
|
||||
static int nfs_prev_getfh_sy_narg;
|
||||
static sy_call_t *nfs_prev_getfh_sy_call;
|
||||
|
||||
/*
|
||||
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
|
||||
@ -558,8 +556,6 @@ extern nfstype nfsv3_type[9];
|
||||
extern struct nfsnodehashhead *nfsnodehashtbl;
|
||||
extern u_long nfsnodehash;
|
||||
|
||||
struct getfh_args;
|
||||
extern int getfh(struct proc *, struct getfh_args *, int *);
|
||||
struct nfssvc_args;
|
||||
extern int nfssvc(struct proc *, struct nfssvc_args *, int *);
|
||||
|
||||
@ -1184,12 +1180,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_nfssvc].sy_narg = 2;
|
||||
nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call;
|
||||
sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc;
|
||||
#ifndef NFS_NOSERVER
|
||||
nfs_prev_getfh_sy_narg = sysent[SYS_getfh].sy_narg;
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
nfs_prev_getfh_sy_call = sysent[SYS_getfh].sy_call;
|
||||
sysent[SYS_getfh].sy_call = (sy_call_t *)getfh;
|
||||
#endif
|
||||
|
||||
nfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
|
||||
@ -1209,10 +1199,6 @@ nfs_uninit(vfsp)
|
||||
lease_updatetime = nfs_prev_lease_updatetime;
|
||||
sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg;
|
||||
sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
sysent[SYS_getfh].sy_narg = nfs_prev_getfh_sy_narg;
|
||||
sysent[SYS_getfh].sy_call = nfs_prev_getfh_sy_call;
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,6 @@ static sy_call_t *nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
|
||||
static vop_t *nfs_prev_vop_lease_check;
|
||||
static int nfs_prev_getfh_sy_narg;
|
||||
static sy_call_t *nfs_prev_getfh_sy_call;
|
||||
|
||||
/*
|
||||
* Mapping of old NFS Version 2 RPC numbers to generic numbers.
|
||||
@ -558,8 +556,6 @@ extern nfstype nfsv3_type[9];
|
||||
extern struct nfsnodehashhead *nfsnodehashtbl;
|
||||
extern u_long nfsnodehash;
|
||||
|
||||
struct getfh_args;
|
||||
extern int getfh(struct proc *, struct getfh_args *, int *);
|
||||
struct nfssvc_args;
|
||||
extern int nfssvc(struct proc *, struct nfssvc_args *, int *);
|
||||
|
||||
@ -1184,12 +1180,6 @@ nfs_init(vfsp)
|
||||
sysent[SYS_nfssvc].sy_narg = 2;
|
||||
nfs_prev_nfssvc_sy_call = sysent[SYS_nfssvc].sy_call;
|
||||
sysent[SYS_nfssvc].sy_call = (sy_call_t *)nfssvc;
|
||||
#ifndef NFS_NOSERVER
|
||||
nfs_prev_getfh_sy_narg = sysent[SYS_getfh].sy_narg;
|
||||
sysent[SYS_getfh].sy_narg = 2;
|
||||
nfs_prev_getfh_sy_call = sysent[SYS_getfh].sy_call;
|
||||
sysent[SYS_getfh].sy_call = (sy_call_t *)getfh;
|
||||
#endif
|
||||
|
||||
nfs_pbuf_freecnt = nswbuf / 2 + 1;
|
||||
|
||||
@ -1209,10 +1199,6 @@ nfs_uninit(vfsp)
|
||||
lease_updatetime = nfs_prev_lease_updatetime;
|
||||
sysent[SYS_nfssvc].sy_narg = nfs_prev_nfssvc_sy_narg;
|
||||
sysent[SYS_nfssvc].sy_call = nfs_prev_nfssvc_sy_call;
|
||||
#ifndef NFS_NOSERVER
|
||||
sysent[SYS_getfh].sy_narg = nfs_prev_getfh_sy_narg;
|
||||
sysent[SYS_getfh].sy_call = nfs_prev_getfh_sy_call;
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user