summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-06-16 13:09:18 +0000
committermjg <mjg@FreeBSD.org>2015-06-16 13:09:18 +0000
commit1a3e7a935ea43cdf9b106244b3742c7babf5083b (patch)
tree15e657e125a980a05b63ad49c2f534d1a717de10 /sys/compat/svr4
parent6ea7eb1bceba958493920719e4cd9697af18670f (diff)
downloadFreeBSD-src-1a3e7a935ea43cdf9b106244b3742c7babf5083b.zip
FreeBSD-src-1a3e7a935ea43cdf9b106244b3742c7babf5083b.tar.gz
Replace struct filedesc argument in getvnode with struct thread
This is is a step towards removal of spurious arguments.
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_misc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 9ad2a09..ec4504e 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -262,8 +262,7 @@ svr4_sys_getdents64(td, uap)
DPRINTF(("svr4_sys_getdents64(%d, *, %d)\n",
uap->fd, uap->nbytes));
- error = getvnode(td->td_proc->p_fd, uap->fd,
- cap_rights_init(&rights, CAP_READ), &fp);
+ error = getvnode(td, uap->fd, cap_rights_init(&rights, CAP_READ), &fp);
if (error != 0)
return (error);
@@ -442,8 +441,7 @@ svr4_sys_getdents(td, uap)
if (uap->nbytes < 0)
return (EINVAL);
- error = getvnode(td->td_proc->p_fd, uap->fd,
- cap_rights_init(&rights, CAP_READ), &fp);
+ error = getvnode(td, uap->fd, cap_rights_init(&rights, CAP_READ), &fp);
if (error != 0)
return (error);
@@ -623,7 +621,6 @@ svr4_sys_fchroot(td, uap)
struct svr4_sys_fchroot_args *uap;
{
cap_rights_t rights;
- struct filedesc *fdp = td->td_proc->p_fd;
struct vnode *vp;
struct file *fp;
int error;
@@ -631,7 +628,7 @@ svr4_sys_fchroot(td, uap)
if ((error = priv_check(td, PRIV_VFS_FCHROOT)) != 0)
return error;
/* XXX: we have the chroot priv... what cap might we need? all? */
- if ((error = getvnode(fdp, uap->fd, cap_rights_init(&rights), &fp)) != 0)
+ if ((error = getvnode(td, uap->fd, cap_rights_init(&rights), &fp)) != 0)
return error;
vp = fp->f_vnode;
VREF(vp);
OpenPOWER on IntegriCloud