summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_util.c')
-rw-r--r--sys/compat/linux/linux_util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 6e14080..45c85b6 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -50,8 +50,8 @@ const char linux_emul_path[] = "/compat/linux";
* be in exists.
*/
int
-linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
- struct proc *p;
+linux_emul_find(td, sgp, prefix, path, pbuf, cflag)
+ struct thread *td;
caddr_t *sgp; /* Pointer to stackgap memory */
const char *prefix;
char *path;
@@ -104,7 +104,7 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
for (cp = &ptr[len] - 1; *cp != '/'; cp--);
*cp = '\0';
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, buf, p);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, buf, td);
if ((error = namei(&nd)) != 0) {
free(buf, M_TEMP);
@@ -114,7 +114,7 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
*cp = '/';
}
else {
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, buf, p);
+ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, buf, td);
if ((error = namei(&nd)) != 0) {
free(buf, M_TEMP);
@@ -130,7 +130,7 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
* to the emulation root directory. This is expensive :-(
*/
NDINIT(&ndroot, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path,
- p);
+ td);
if ((error = namei(&ndroot)) != 0) {
/* Cannot happen! */
@@ -140,11 +140,11 @@ linux_emul_find(p, sgp, prefix, path, pbuf, cflag)
return error;
}
- if ((error = VOP_GETATTR(nd.ni_vp, &vat, p->p_ucred, p)) != 0) {
+ if ((error = VOP_GETATTR(nd.ni_vp, &vat, td->td_proc->p_ucred, td)) != 0) {
goto bad;
}
- if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, p->p_ucred, p))
+ if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, td->td_proc->p_ucred, td))
!= 0) {
goto bad;
}
OpenPOWER on IntegriCloud