Subject: pecoff
To: None <tech-kern@netbsd.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-kern
Date: 10/20/2005 15:35:10
--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I think the attached patch is needed.. While I was there I noticed that
other emulations use
Index: pecoff_misc.c
===================================================================
RCS file: /cvsroot/src/sys/compat/pecoff/pecoff_misc.c,v
retrieving revision 1.11
diff -u -r1.11 pecoff_misc.c
--- pecoff_misc.c 19 Aug 2005 02:03:57 -0000 1.11
+++ pecoff_misc.c 20 Oct 2005 11:48:15 -0000
@@ -305,13 +305,18 @@
void *v;
register_t *retval;
{
- struct proc *p = l->l_proc;
struct pecoff_sys_execve_args *uap = v;
+ struct proc *p = l->l_proc;
+ struct sys_execve_args ap;
caddr_t sg = stackgap_init(p, 0);
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- return sys_execve(l, v, retval);
+ SCARG(&ap, path) = SCARG(uap, path);
+ SCARG(&ap, argp) = SCARG(uap, argp);
+ SCARG(&ap, envp) = SCARG(uap, envp);
+
+ return sys_execve(l, &ap, retval);
}
Yet things seem to work without the above.
Cheers,
Patrick
--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=pecoffpat
Index: syscalls.master
===================================================================
RCS file: /cvsroot/src/sys/compat/pecoff/syscalls.master,v
retrieving revision 1.12
diff -u -r1.12 syscalls.master
--- syscalls.master 19 Aug 2005 02:03:58 -0000 1.12
+++ syscalls.master 20 Oct 2005 14:31:19 -0000
@@ -629,7 +629,11 @@
const sigset_t *set, \
sigset_t *oset); }
294 NOARGS { int sys___sigsuspend14(const sigset_t *set); }
+#ifdef COMPAT_16
295 NOARGS { int compat_16_sys___sigreturn14(struct sigcontext *sigcntxp); }
+#else
+295 EXCL compat_16_sys___sigreturn14
+#endif
296 NOARGS { int sys___getcwd(char *bufp, size_t length); }
297 NOARGS { int sys_fchroot(int fd); }
298 NOARGS { int sys_fhopen(const fhandle_t *fhp, int flags); }
--jRHKVT23PllUwdXP--