summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_process.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
committerphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
commit4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch)
tree70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/kern/sys_process.c
parent363a7ddf8560aa6b11580adeb58853d719217b26 (diff)
downloadFreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.zip
FreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.tar.gz
Move the "retval" (3rd) parameter from all syscall functions and put
it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r--sys/kern/sys_process.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 364fc9b..9ae7569 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sys_process.c,v 1.29 1997/04/27 21:26:29 alex Exp $
+ * $Id: sys_process.c,v 1.30 1997/09/02 20:05:53 bde Exp $
*/
#include <sys/param.h>
@@ -201,10 +201,9 @@ struct ptrace_args {
#endif
int
-ptrace(curp, uap, retval)
+ptrace(curp, uap)
struct proc *curp;
struct ptrace_args *uap;
- int *retval;
{
struct proc *p;
struct iovec iov;
@@ -304,7 +303,7 @@ ptrace(curp, uap, retval)
*/
write = 0;
- *retval = 0;
+ p->p_retval[0] = 0;
switch (uap->req) {
case PT_TRACE_ME:
@@ -381,7 +380,7 @@ ptrace(curp, uap, retval)
case PT_READ_I:
case PT_READ_D:
/* write = 0 set above */
- iov.iov_base = write ? (caddr_t)&uap->data : (caddr_t)retval;
+ iov.iov_base = write ? (caddr_t)&uap->data : (caddr_t)p->p_retval;
iov.iov_len = sizeof(int);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
@@ -415,9 +414,9 @@ ptrace(curp, uap, retval)
if (p->p_flag & P_INMEM) {
p->p_addr->u_kproc.kp_proc = *p;
fill_eproc (p, &p->p_addr->u_kproc.kp_eproc);
- *retval = *(int*)((u_int)p->p_addr + (u_int)uap->addr);
+ p->p_retval[0] = *(int*)((u_int)p->p_addr + (u_int)uap->addr);
} else {
- *retval = 0;
+ p->p_retval[0] = 0;
error = EFAULT;
}
PRELE(p);
OpenPOWER on IntegriCloud