Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 Fix wrong psstr computation.



details:   https://anonhg.NetBSD.org/src/rev/5065678470ca
branches:  trunk
changeset: 532383:5065678470ca
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Thu Jun 06 10:12:42 2002 +0000

description:
Fix wrong psstr computation.
(XXX why is there an entire copy of sys_execve here?)

diffstat:

 sys/compat/netbsd32/netbsd32_execve.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 39d9edd05e27 -r 5065678470ca sys/compat/netbsd32/netbsd32_execve.c
--- a/sys/compat/netbsd32/netbsd32_execve.c     Thu Jun 06 09:53:22 2002 +0000
+++ b/sys/compat/netbsd32/netbsd32_execve.c     Thu Jun 06 10:12:42 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_execve.c,v 1.9 2002/03/22 21:36:46 jdolecek Exp $     */
+/*     $NetBSD: netbsd32_execve.c,v 1.10 2002/06/06 10:12:42 fvdl Exp $        */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.9 2002/03/22 21:36:46 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.10 2002/06/06 10:12:42 fvdl Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ktrace.h"
@@ -327,7 +327,8 @@
        stack = (char *) (vm->vm_minsaddr - len);
 
        /* fill process ps_strings info */
-       p->p_psstr = (struct ps_strings *)(stack - sizeof(struct ps_strings));
+       p->p_psstr = (struct ps_strings *)(vm->vm_minsaddr -
+           sizeof(struct ps_strings));
        p->p_psargv = offsetof(struct ps_strings, ps_argvstr);
        p->p_psnargv = offsetof(struct ps_strings, ps_nargvstr);
        p->p_psenv = offsetof(struct ps_strings, ps_envstr);



Home | Main Index | Thread Index | Old Index