Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/kern pull up 1.63 (approved by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/f84daae2d629
branches:  netbsd-1-5
changeset: 488829:f84daae2d629
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 31 02:49:19 2000 +0000

description:
pull up 1.63 (approved by thorpej):
>Fix LP64BE bug.

diffstat:

 sys/kern/sys_process.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (55 lines):

diff -r 4245059a8af0 -r f84daae2d629 sys/kern/sys_process.c
--- a/sys/kern/sys_process.c    Mon Jul 31 02:41:26 2000 +0000
+++ b/sys/kern/sys_process.c    Mon Jul 31 02:49:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_process.c,v 1.61 1999/03/25 04:45:57 sommerfe Exp $        */
+/*     $NetBSD: sys_process.c,v 1.61.18.1 2000/07/31 02:49:19 mrg Exp $        */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou.  All rights reserved.
@@ -93,7 +93,7 @@
        struct proc *t;                         /* target process */
        struct uio uio;
        struct iovec iov;
-       int error, write;
+       int error, write, tmp;
 
        /* "A foolish consistency..." XXX */
        if (SCARG(uap, req) == PT_TRACE_ME)
@@ -211,6 +211,7 @@
        /* Now do the operation. */
        write = 0;
        *retval = 0;
+       tmp = 0;
 
        switch (SCARG(uap, req)) {
        case  PT_TRACE_ME:
@@ -222,20 +223,23 @@
        case  PT_WRITE_I:               /* XXX no seperate I and D spaces */
        case  PT_WRITE_D:
                write = 1;
+               tmp = SCARG(uap, data);
        case  PT_READ_I:                /* XXX no seperate I and D spaces */
        case  PT_READ_D:
                /* write = 0 done above. */
-               iov.iov_base =
-                   write ? (caddr_t)&SCARG(uap, data) : (caddr_t)retval;
-               iov.iov_len = sizeof(int);
+               iov.iov_base = (caddr_t)&tmp;
+               iov.iov_len = sizeof(tmp);
                uio.uio_iov = &iov;
                uio.uio_iovcnt = 1;
                uio.uio_offset = (off_t)(long)SCARG(uap, addr);
-               uio.uio_resid = sizeof(int);
+               uio.uio_resid = sizeof(tmp);
                uio.uio_segflg = UIO_SYSSPACE;
                uio.uio_rw = write ? UIO_WRITE : UIO_READ;
                uio.uio_procp = p;
-               return (procfs_domem(p, t, NULL, &uio));
+               error = procfs_domem(p, t, NULL, &uio);
+               if (!write)
+                       *retval = tmp;
+               return (error);
 
 #ifdef PT_STEP
        case  PT_STEP:



Home | Main Index | Thread Index | Old Index