Subject: Re: Bug in compat sunos?
To: Krister Walfridsson <cato@df.lth.se>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-sparc
Date: 08/26/1996 15:40:07
On Sun, 25 Aug 1996 19:25:09 +0200 (CED) 
 Krister Walfridsson <cato@df.lth.se> wrote:

 > It's using #59. I changed the item for #59 in syscalls.master to
 >    
 >    59      STD             { int sunos_sys_execv(char *path, char **argp); }
 > 
 > and everything seems to be working now.

Attached below is the change I committed to the trunk ... I'll send a 
pullup request; maybe this will make 1.2...

Go to sys/compat/sunos, apply this patch, run "make" in that directory, 
then rebuild your kernel.

 -- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ -- 
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939

----- snip -----
Index: syscalls.master
===================================================================
RCS file: /mastersrc/netbsd/src/sys/compat/sunos/syscalls.master,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 syscalls.master
*** syscalls.master	1996/07/03 05:19:47	1.1.1.3
--- syscalls.master	1996/08/26 23:05:26
***************
*** 103,109 ****
  56	OBSOL		sunos_owait3
  57	NOARGS		{ int sys_symlink(char *path, char *link); }
  58	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
! 59	NOARGS		{ int sys_execve(char *path, char **argp, \
  			    char **envp); }
  60	NOARGS		{ int sys_umask(int newmask); }
  61	NOARGS		{ int sys_chroot(char *path); }
--- 103,109 ----
  56	OBSOL		sunos_owait3
  57	NOARGS		{ int sys_symlink(char *path, char *link); }
  58	NOARGS		{ int sys_readlink(char *path, char *buf, int count); }
! 59	STD		{ int sunos_sys_execve(char *path, char **argp, \
  			    char **envp); }
  60	NOARGS		{ int sys_umask(int newmask); }
  61	NOARGS		{ int sys_chroot(char *path); }
Index: sunos_misc.c
===================================================================
RCS file: /mastersrc/netbsd/src/sys/compat/sunos/sunos_misc.c,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 sunos_misc.c
*** sunos_misc.c	1996/08/12 21:46:41	1.1.1.7
--- sunos_misc.c	1996/08/26 23:09:42
***************
*** 192,197 ****
--- 192,216 ----
  }
  
  int
+ sunos_sys_execve(p, v, retval)
+ 	struct proc *p;
+ 	void *v;
+ 	register_t *retval;
+ {
+ 	struct sunos_sys_execve_args *uap = v;
+ 	struct sys_execve_args ouap;
+ 
+ 	caddr_t sg = stackgap_init(p->p_emul);
+ 	SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
+ 
+ 	SCARG(&ouap, path) = SCARG(uap, path);
+ 	SCARG(&ouap, argp) = SCARG(uap, argp);
+ 	SCARG(&ouap, envp) = SCARG(uap, envp);
+ 
+ 	return (sys_execve(p, &ouap, retval));
+ }
+ 
+ int
  sunos_sys_omsync(p, v, retval)
  	struct proc *p;
  	void *v;