}
#if defined(AFS_FBSD80_ENV)
VOP_UNLOCK(vp, 0);
-#elif defined(AFS_FBSD50_ENV)
- VOP_UNLOCK(vp, 0, curthread);
#else
- VOP_UNLOCK(vp, 0, curproc);
+ VOP_UNLOCK(vp, 0, curthread);
#endif
afile->vnode = vp;
afile->size = VTOI(vp)->i_size;
vn_lock(afile->vnode, LK_EXCLUSIVE | LK_RETRY);
code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp);
VOP_UNLOCK(afile->vnode, 0);
-#elif defined(AFS_FBSD50_ENV)
+#else
vn_lock(afile->vnode, LK_EXCLUSIVE | LK_RETRY, curthread);
code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp, curthread);
VOP_UNLOCK(afile->vnode, LK_EXCLUSIVE, curthread);
-#else
- code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp, curproc);
#endif
AFS_GLOCK();
if (code == 0) {
#if defined(AFS_FBSD80_ENV)
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp);
-#elif defined(AFS_FBSD50_ENV)
+#else
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread);
code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp, curthread);
-#else
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curproc);
- code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp, curproc);
#endif
if (code != 0 || tvattr.va_size <= asize)
goto out;
tvattr.va_size = asize;
#if defined(AFS_FBSD80_ENV)
code = VOP_SETATTR(vp, &tvattr, afs_osi_credp);
-#elif defined(AFS_FBSD50_ENV)
- code = VOP_SETATTR(vp, &tvattr, afs_osi_credp, curthread);
#else
- code = VOP_SETATTR(vp, &tvattr, afs_osi_credp, curproc);
+ code = VOP_SETATTR(vp, &tvattr, afs_osi_credp, curthread);
#endif
out:
#if defined(AFS_FBSD80_ENV)
VOP_UNLOCK(vp, 0);
-#elif defined(AFS_FBSD50_ENV)
- VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread);
#else
- VOP_UNLOCK(vp, LK_EXCLUSIVE, curproc);
+ VOP_UNLOCK(vp, LK_EXCLUSIVE, curthread);
#endif
if (glocked)
AFS_GLOCK();
afs_getgroups(struct ucred *cred, int ngroups, gid_t * gidset);
static int
- afs_setgroups(struct proc *proc, struct ucred **cred, int ngroups,
+ afs_setgroups(struct thread *td, struct ucred **cred, int ngroups,
gid_t * gidset, int change_parent);
-#ifdef AFS_FBSD50_ENV
-/*
- * This does nothing useful yet.
- * In 5.0, creds are associated not with a process, but with a thread.
- * Probably the right thing to do is replace struct proc with struct thread
- * everywhere, including setpag.
- * That will be a tedious undertaking.
- * For now, I'm just passing curproc to AddPag.
- * This is probably wrong and I don't know what the consequences might be.
- */
int
Afs_xsetgroups(struct thread *td, struct setgroups_args *uap)
if (((treq.uid >> 24) & 0xff) == 'A') {
AFS_GLOCK();
/* we've already done a setpag, so now we redo it */
- AddPag(curproc, treq.uid, &cr);
- AFS_GUNLOCK();
- }
- }
- crfree(cr);
- return code;
-}
-#else /* FBSD50 */
-int
-Afs_xsetgroups(p, args, retval)
- struct proc *p;
- void *args;
- int *retval;
-{
- int code = 0;
- struct vrequest treq;
- struct ucred *cr;
-
- cr = crdup(p->p_cred->pc_ucred);
-
- AFS_STATCNT(afs_xsetgroups);
- AFS_GLOCK();
-
- code = afs_InitReq(&treq, cr);
- AFS_GUNLOCK();
- crfree(cr);
- if (code)
- return setgroups(p, args, retval); /* afs has shut down */
-
- code = setgroups(p, args, retval);
- /* Note that if there is a pag already in the new groups we don't
- * overwrite it with the old pag.
- */
- cr = crdup(p->p_cred->pc_ucred);
-
- if (PagInCred(cr) == NOPAG) {
- if (((treq.uid >> 24) & 0xff) == 'A') {
- AFS_GLOCK();
- /* we've already done a setpag, so now we redo it */
- AddPag(p, treq.uid, &cr);
+ AddPag(td, treq.uid, &cr);
AFS_GUNLOCK();
}
}
crfree(cr);
return code;
}
-#endif
int
-setpag(struct proc *proc, struct ucred **cred, afs_uint32 pagvalue,
+setpag(struct thread *td, struct ucred **cred, afs_uint32 pagvalue,
afs_uint32 * newpag, int change_parent)
{
#ifdef AFS_FBSD80_ENV
}
*newpag = (pagvalue == -1 ? genpag() : pagvalue);
afs_get_groups_from_pag(*newpag, &gidset[1], &gidset[2]);
- code = afs_setgroups(proc, cred, ngroups, gidset, change_parent);
+ code = afs_setgroups(td, cred, ngroups, gidset, change_parent);
#ifdef AFS_FBSD80_ENV
osi_Free(gidset, gidset_len * sizeof(gid_t));
#endif
static int
-afs_setgroups(struct proc *proc, struct ucred **cred, int ngroups,
+afs_setgroups(struct thread *td, struct ucred **cred, int ngroups,
gid_t * gidset, int change_parent)
{
-#ifndef AFS_FBSD50_ENV
- int ngrps;
- int i;
- gid_t *gp;
- struct ucred *oldcr, *cr;
-
- AFS_STATCNT(afs_setgroups);
- /*
- * The real setgroups() call does this, so maybe we should too.
- *
- */
- if (ngroups > NGROUPS)
- return EINVAL;
- cr = *cred;
- cr->cr_ngroups = ngroups;
- gp = cr->cr_groups;
- while (ngroups--)
- *gp++ = *gidset++;
- if (change_parent) {
- crhold(cr);
- oldcr = proc->p_pptr->p_cred->pc_ucred;
- proc->p_pptr->p_cred->pc_ucred = cr;
- crfree(oldcr);
- }
- crhold(cr);
- oldcr = proc->p_cred->pc_ucred;
- proc->p_cred->pc_ucred = cr;
- crfree(oldcr);
-#endif
return (0);
}
#define osi_suser_client_settings(x) (!priv_check(curthread, PRIV_AFS_ADMIN))
#define osi_suser_afs_daemon(x) (!priv_check(curthread, PRIV_AFS_DAEMON))
#define afs_suser(x) (osi_suser_client_settings((x)) && osi_suser_afs_daemon((x)))
-#elif defined(AFS_FBSD50_ENV)
-#define afs_suser(x) (!suser(curthread))
#else
-#define afs_suser(x) (!suser(curproc))
+#define afs_suser(x) (!suser(curthread))
#endif
#undef osi_getpid
-#if defined(AFS_FBSD50_ENV)
#define VT_AFS "afs"
#define VROOT VV_ROOT
#define v_flag v_vflag
afs_global_owner = 0; \
} while (0)
# endif
-#else /* FBSD50 */
-extern struct lock afs_global_lock;
-#define osi_curcred() (curproc->p_cred->pc_ucred)
-#define osi_getpid() (curproc->p_pid)
-#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \
- vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(aresid), curproc)
-extern struct proc *afs_global_owner;
-#define AFS_GLOCK() \
- do { \
- osi_Assert(curproc); \
- lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, curproc); \
- osi_Assert(afs_global_owner == 0); \
- afs_global_owner = curproc; \
- } while (0)
-#define AFS_GUNLOCK() \
- do { \
- osi_Assert(curproc); \
- osi_Assert(afs_global_owner == curproc); \
- afs_global_owner = 0; \
- lockmgr(&afs_global_lock, LK_RELEASE, 0, curproc); \
- } while(0)
-#define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
-#define osi_InitGlock() \
- do { \
- lockinit(&afs_global_lock, PLOCK, "afs global lock", 0, 0); \
- afs_global_owner = 0; \
- } while (0)
-#endif /* FBSD50 */
#undef SPLVAR
#define SPLVAR int splvar
#include "afsincludes.h" /* Afs-based standard headers */
#include <sys/namei.h>
-#ifdef AFS_FBSD50_ENV
-/* serious cheating */
-#undef curproc
-#define curproc curthread
-#endif
-
int
osi_lookupname(char *aname, enum uio_seg seg, int followlink,
struct vnode **vpp)
#ifdef AFS_FBSD80_ENV
flags |= MPSAFE; /* namei must take GIANT if needed */
#endif
- NDINIT(&n, LOOKUP, flags, seg, aname, curproc);
+ NDINIT(&n, LOOKUP, flags, seg, aname, curthread);
if ((error = namei(&n)) != 0) {
#ifdef AFS_FBSD50_ENV
if (glocked)
/* XXX should we do this? Usually NOT (matt) */
#if defined(AFS_FBSD80_ENV)
/*VOP_UNLOCK(n.ni_vp, 0);*/
-#elif defined(AFS_FBSD50_ENV)
- VOP_UNLOCK(n.ni_vp, 0, curthread);
#else
- VOP_UNLOCK(n.ni_vp, 0, curproc);
+ VOP_UNLOCK(n.ni_vp, 0, curthread);
#endif
NDFREE(&n, NDF_ONLY_PNBUF);
#ifdef AFS_FBSD50_ENV
int afs_uninit(struct vfsconf *vfc);
#if defined(AFS_FBSD80_ENV)
extern int afs_statfs(struct mount *mp, struct statfs *abp);
-#elif defined(AFS_FBSD50_ENV)
-extern int afs_statfs(struct mount *mp, struct statfs *abp, struct thread *th);
#else
-extern int afs_statfs(struct mount *mp, struct statfs *abp, struct proc *p);
+extern int afs_statfs(struct mount *mp, struct statfs *abp, struct thread *td);
#endif
#endif /* _OSI_PROTO_H_ */
struct mount *afs_globalVFS = NULL;
int afs_pbuf_freecnt = -1;
-#ifdef AFS_FBSD50_ENV
-#define THREAD_OR_PROC struct thread *p
-#else
-#define THREAD_OR_PROC struct proc *p
-#endif
-
extern int Afs_xsetgroups();
extern int afs_xioctl();
}
int
-afs_start(struct mount *mp, int flags, THREAD_OR_PROC)
+afs_start(struct mount *mp, int flags, struct thread *p)
{
return (0); /* nothing to do. ? */
}
afs_omount(struct mount *mp, char *path, caddr_t data, struct thread *p)
#else
afs_omount(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp,
- THREAD_OR_PROC)
+ struct thread *p)
#endif
{
/* ndp contains the mounted-from device. Just ignore it.
- * we also don't care about our proc struct. */
+ * we also don't care about our thread struct. */
size_t size;
if (mp->mnt_flag & MNT_UPDATE)
#ifdef AFS_FBSD80_ENV
afs_unmount(struct mount *mp, int flags)
#else
-afs_unmount(struct mount *mp, int flags, THREAD_OR_PROC)
+afs_unmount(struct mount *mp, int flags, struct thread *p)
#endif
{
int error;
struct vrequest treq;
register struct vcache *tvp = 0;
-#ifdef AFS_FBSD50_ENV
#if !defined(AFS_FBSD53_ENV) || defined(AFS_FBSD80_ENV)
struct thread *td = curthread;
#endif
struct ucred *cr = osi_curcred();
-#else
- struct proc *p = curproc;
- struct ucred *cr = p->p_cred->pc_ucred;
-#endif
AFS_GLOCK();
AFS_STATCNT(afs_root);
#ifdef AFS_FBSD80_ENV
afs_statfs(struct mount *mp, struct statfs *abp)
#else
-afs_statfs(struct mount *mp, struct statfs *abp, THREAD_OR_PROC)
+afs_statfs(struct mount *mp, struct statfs *abp, struct thread *p)
#endif
{
AFS_GLOCK();
#elif defined(AFS_FBSD60_ENV)
afs_sync(struct mount *mp, int waitfor, struct thread *td)
#else
-afs_sync(struct mount *mp, int waitfor, struct ucred *cred, THREAD_OR_PROC)
+afs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *p)
#endif
{
return 0;
#if defined(AFS_FBSD80_ENV)
#define lock_vnode(v) vn_lock((v), LK_EXCLUSIVE | LK_RETRY)
#define unlock_vnode(v) VOP_UNLOCK((v), 0)
-#elif defined(AFS_FBSD50_ENV)
+#else
#define lock_vnode(v) vn_lock((v), LK_EXCLUSIVE | LK_RETRY, curthread)
#define unlock_vnode(v) VOP_UNLOCK((v), 0, curthread)
-#else
-#define lock_vnode(v) vn_lock((v), LK_EXCLUSIVE | LK_RETRY, curproc)
-#define unlock_vnode(v) VOP_UNLOCK((v), 0, curproc)
-/* need splvm() protection? */
-#define VM_OBJECT_LOCK(o)
-#define VM_OBJECT_UNLOCK(o)
#endif
/* Try to discard pages, in order to recycle a vcache entry.
do {
anyio = 0;
if (VOP_GETVOBJECT(vp, &obj) == 0 && (obj->flags & OBJ_MIGHTBEDIRTY)) {
-#ifdef AFS_FBSD50_ENV
if (!vget(vp, LK_EXCLUSIVE | LK_RETRY, curthread)) {
-#else
- if (!vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_NOOBJ, curproc)) {
-#endif
if (VOP_GETVOBJECT(vp, &obj) == 0) {
VM_OBJECT_LOCK(obj);
vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
register int flags = ap->a_cnp->cn_flags;
int lockparent; /* 1 => lockparent flag is set */
int wantparent; /* 1 => wantparent or lockparent flag */
-#ifdef AFS_FBSD50_ENV
struct thread *p = ap->a_cnp->cn_thread;
-#else
- struct proc *p = ap->a_cnp->cn_proc;
-#endif
dvp = ap->a_dvp;
if (dvp->v_type != VDIR) {
int error = 0;
struct vcache *vcp;
register struct vnode *dvp = ap->a_dvp;
-#ifdef AFS_FBSD50_ENV
struct thread *p = ap->a_cnp->cn_thread;
-#else
- struct proc *p = ap->a_cnp->cn_proc;
-#endif
GETNAME();
AFS_GLOCK();
* struct vnode *a_vp;
* int a_mode;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *a_td;
+ * struct file *a_fp;
* } */ *ap;
{
int error;
* struct vnode *a_vp;
* int a_fflag;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *a_td;
* } */ *ap;
{
int code;
afs_vop_access(ap)
struct vop_access_args /* {
* struct vnode *a_vp;
- * int a_mode;
+ * accmode_t a_accmode;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *a_td;
* } */ *ap;
{
int code;
* struct vnode *a_vp;
* struct vattr *a_vap;
* struct ucred *a_cred;
- * struct proc *a_p;
* } */ *ap;
{
int code;
* struct vnode *a_vp;
* struct vattr *a_vap;
* struct ucred *a_cred;
- * struct proc *a_p;
* } */ *ap;
{
int code;
uio.uio_resid = ap->a_count;
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = UIO_READ;
-#ifdef AFS_FBSD50_ENV
uio.uio_td = curthread;
-#else
- uio.uio_procp = curproc;
-#endif
AFS_GLOCK();
osi_FlushPages(avc, osi_curcred()); /* hold bozon lock, but not basic vnode lock */
uio.uio_resid = ap->a_count;
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = UIO_WRITE;
-#ifdef AFS_FBSD50_ENV
uio.uio_td = curthread;
-#else
- uio.uio_procp = curproc;
-#endif
sync = IO_VMIO;
if (ap->a_sync & VM_PAGER_PUT_SYNC)
sync |= IO_SYNC;
afs_vop_ioctl(ap)
struct vop_ioctl_args /* {
* struct vnode *a_vp;
- * int a_command;
- * caddr_t a_data;
+ * u_long a_command;
+ * void *a_data;
* int a_fflag;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *a_td;
* } */ *ap;
{
struct vcache *tvc = VTOAFS(ap->a_vp);
* struct vnode *a_vp;
* int a_events;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *td;
* } */ *ap;
{
/*
* struct vnode *a_vp;
* int a_fflags;
* struct ucred *a_cred;
- * struct proc *a_p;
+ * struct thread *td;
* } */ *ap;
{
return (EINVAL);
afs_vop_fsync(ap)
struct vop_fsync_args /* {
* struct vnode *a_vp;
- * struct ucred *a_cred;
* int a_waitfor;
- * struct proc *a_p;
+ * struct thread *td;
* } */ *ap;
{
int error;
int error = 0;
register struct vnode *dvp = ap->a_tdvp;
register struct vnode *vp = ap->a_vp;
-#ifdef AFS_FBSD50_ENV
struct thread *p = ap->a_cnp->cn_thread;
-#else
- struct proc *p = ap->a_cnp->cn_proc;
-#endif
GETNAME();
if (dvp->v_mount != vp->v_mount) {
register struct vnode *tdvp = ap->a_tdvp;
struct vnode *fvp = ap->a_fvp;
register struct vnode *fdvp = ap->a_fdvp;
-#ifdef AFS_FBSD50_ENV
struct thread *p = fcnp->cn_thread;
-#else
- struct proc *p = fcnp->cn_proc;
-#endif
/*
* Check for cross-device rename.
register struct vattr *vap = ap->a_vap;
int error = 0;
struct vcache *vcp;
-#ifdef AFS_FBSD50_ENV
struct thread *p = ap->a_cnp->cn_thread;
-#else
- struct proc *p = ap->a_cnp->cn_proc;
-#endif
GETNAME();
#ifdef DIAGNOSTIC
error = afs_lookup(VTOAFS(dvp), name, &vcp, cnp->cn_cred);
if (error == 0) {
newvp = AFSTOV(vcp);
-#ifdef AFS_FBSD50_ENV
ma_vn_lock(newvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_thread);
-#else
- ma_vn_lock(newvp, LK_EXCLUSIVE | LK_RETRY, cnp->cn_proc);
-#endif
}
}
AFS_GUNLOCK();
afs_vop_inactive(ap)
struct vop_inactive_args /* {
* struct vnode *a_vp;
- * struct proc *a_p;
+ * struct thread *td;
* } */ *ap;
{
register struct vnode *vp = ap->a_vp;
int
#if defined(AFS_SUN5_ENV)
afs_setpag(afs_ucred_t **credpp)
+#elif defined(AFS_FBSD_ENV)
+afs_setpag(struct thread *td, void *args)
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_setpag(afs_proc_t *p, void *args, int *retval)
#else
#if defined(AFS_SUN5_ENV)
code = AddPag(genpag(), credpp);
+#elif defined(AFS_FBSD_ENV)
+ code = AddPag(td, genpag(), &td->td_ucred);
#elif defined(AFS_XBSD_ENV)
code = AddPag(p, genpag(), &p->p_rcred);
#elif defined(AFS_AIX41_ENV)
int
#if defined(AFS_SUN5_ENV)
afs_setpag_val(afs_ucred_t **credpp, int pagval)
+#elif defined(AFS_FBSD_ENV)
+afs_setpag_val(struct thread *td, void *args, int pagval)
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_setpag_val(afs_proc_t *p, void *args, int *retval, int pagval)
#else
#if defined(AFS_SUN5_ENV)
code = AddPag(pagval, credpp);
+#elif defined(AFS_FBSD_ENV)
+ code = AddPag(td, pagval, &td->td_ucred);
#elif defined(AFS_XBSD_ENV)
code = AddPag(p, pagval, &p->p_rcred);
#elif defined(AFS_AIX41_ENV)
/* Note - needs to be available on AIX, others can be static - rework this */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
+#if defined(AFS_FBSD_ENV)
+AddPag(struct thread *p, afs_int32 aval, afs_ucred_t **credpp)
+#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
AddPag(afs_proc_t *p, afs_int32 aval, afs_ucred_t **credpp)
#else
-int
AddPag(afs_int32 aval, afs_ucred_t **credpp)
#endif
{
afs_proc_t *p = current_proc(); /* XXX */
char procname[256];
proc_selfname(procname, 256);
+# elif defined(AFS_FBSD_ENV)
+ struct thread *p = curthread;
+ char *procname = p->td_proc->p_comm;
# else
afs_proc_t *p = curproc; /* XXX */
char *procname = p->p_comm;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
+# if defined(AFS_FBSD_ENV)
+afs_pioctl(struct thread *td, void *args)
+# else
afs_pioctl(afs_proc_t *p, void *args, int *retval)
+# endif
{
struct a {
char *path;
# else
return (afs_syscall_pioctl
(uap->path, uap->cmd, uap->cmarg, uap->follow,
+# if defined(AFS_FBSD_ENV)
+ td->td_ucred));
+# else
p->p_cred->pc_ucred));
+# endif
# endif
}
afs_proc_t *p = current_proc(); /* XXX */
char procname[256];
proc_selfname(procname, 256);
+# elif defined(AFS_FBSD_ENV)
+ struct thread *p = curthread;
+ char *procname = p->td_proc->p_comm;
# else
afs_proc_t *p = curproc; /* XXX */
char *procname = p->p_comm;
/* afs_osi_pag.c */
#if defined(AFS_SUN5_ENV)
extern int afs_setpag(afs_ucred_t **credpp);
+#elif defined(AFS_FBSD_ENV)
+extern int afs_setpag(struct thread *td, void *args);
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int afs_setpag(afs_proc_t *p, void *args, int *retval);
#else
extern afs_uint32 genpag(void);
extern afs_uint32 getpag(void);
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_FBSD_ENV)
+extern int AddPag(struct thread *td, afs_int32 aval, afs_ucred_t **credpp);
+#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
extern int AddPag(afs_proc_t *p, afs_int32 aval, afs_ucred_t **credpp);
#else
extern int AddPag(afs_int32 aval, afs_ucred_t **credpp);
#else
# if defined AFS_XBSD_ENV
# if !defined(AFS_DFBSD_ENV)
+# if defined(AFS_FBSD_ENV)
+extern int setpag(struct thread *td, struct ucred **cred, afs_uint32 pagvalue,
+ afs_uint32 * newpag, int change_parent);
+# else
extern int setpag(afs_proc_t *proc, struct ucred **cred, afs_uint32 pagvalue,
afs_uint32 * newpag, int change_parent);
-# endif
-# endif
-#endif
+# endif /* AFS_FBSD_ENV */
+# endif /* ! AFS_DFBSD_ENV */
+# endif /* AFS_XBSD_ENV */
+#endif /* UKERNEL */
#if defined(AFS_LINUX26_ENV)
extern afs_int32 osi_get_group_pag(afs_ucred_t *cred);
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#ifdef AFS_DARWIN100_ENV
extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval);
-#elif defined(AFS_FBSD50_ENV)
-extern int afs3_syscall(struct thread *p, void *args, long *retval);
+#elif defined(AFS_FBSD_ENV)
+extern int afs3_syscall(struct thread *p, void *args);
#else
extern int afs3_syscall(afs_proc_t *p, void *args, long *retval);
#endif
{
struct afssysa64 *uap64 = NULL;
struct afssysa *uap = NULL;
+#elif defined(AFS_FBSD_ENV)
+int
+afs3_syscall(struct thread *p, void *args)
+{
+ register struct a {
+ long syscall;
+ long parm1;
+ long parm2;
+ long parm3;
+ long parm4;
+ long parm5;
+ long parm6;
+ } *uap = (struct a *)args;
+ long *retval;
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
int
-afs3_syscall(p, args, retval)
-# ifdef AFS_FBSD50_ENV
- struct thread *p;
-# else
- afs_proc_t *p;
-# endif
- void *args;
- long *retval;
+afs3_syscall(afs_proc_t *p, void *args, long *retval)
{
register struct a {
long syscall;
AFS_GUNLOCK();
#else
AFS_GLOCK();
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_FBSD_ENV)
+ code = afs_setpag(p, args);
+#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
code = afs_setpag(p, args, retval);
#else /* AFS_DARWIN_ENV || AFS_XBSD_ENV */
code = afs_setpag();