diff options
author | Paul Irofti <pirofti@cvs.openbsd.org> | 2011-04-05 15:36:10 +0000 |
---|---|---|
committer | Paul Irofti <pirofti@cvs.openbsd.org> | 2011-04-05 15:36:10 +0000 |
commit | fdefb8649b8ba65c188bb6f7dd7d9eff546be9c0 (patch) | |
tree | bde9d9b3e8f87bf02374ed2c3eb58cd0f7dbc7fa | |
parent | f789e475c931d9b33427a75938953056fe0463be (diff) |
Fix PID fetching -- noticed last night by guenther@.
-rw-r--r-- | sys/compat/linux/linux_dummy.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_misc.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 64b0ca3b9a7..65bdf45571b 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_dummy.c,v 1.16 2004/10/27 13:23:38 niklas Exp $ */ +/* $OpenBSD: linux_dummy.c,v 1.17 2011/04/05 15:36:09 pirofti Exp $ */ /*- * Copyright (c) 1994-1995 Søren Schmidt @@ -52,7 +52,7 @@ static int unsupported_msg(struct proc *p, const char *fname) { printf("linux: syscall %s is obsolete or not implemented (pid=%ld)\n", - fname, (long)p->p_pid); + fname, (long)p->p_p->ps_pid); return (ENOSYS); } diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 455a62097d3..aa4c3746596 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.66 2011/02/11 21:40:04 pirofti Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.67 2011/04/05 15:36:09 pirofti Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -1225,7 +1225,7 @@ linux_sys_getpgid(p, v, retval) } */ *uap = v; struct process *targpr; - if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_pid) { + if (SCARG(uap, pid) != 0 && SCARG(uap, pid) != p->p_p->ps_pid) { if ((targpr = prfind(SCARG(uap, pid))) == 0) return ESRCH; } @@ -1409,7 +1409,7 @@ linux_sys_getpid(p, v, retval) register_t *retval; { - *retval = p->p_pid; + *retval = p->p_p->ps_pid; return (0); } |