| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: netbsd32_exec.h,v 1.28 2008/11/19 18:36:05 ad Exp $ */ | | 1 | /* $NetBSD: netbsd32_exec.h,v 1.29 2009/03/15 15:54:43 cegger Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1998, 2001 Matthew R. Green | | 4 | * Copyright (c) 1998, 2001 Matthew R. Green |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -68,32 +68,28 @@ int netbsd32_elf32_copyargs(struct lwp * | | | @@ -68,32 +68,28 @@ int netbsd32_elf32_copyargs(struct lwp * |
68 | static __inline int netbsd32_copyargs(struct lwp *, struct exec_package *, | | 68 | static __inline int netbsd32_copyargs(struct lwp *, struct exec_package *, |
69 | struct ps_strings *, char **, void *); | | 69 | struct ps_strings *, char **, void *); |
70 | | | 70 | |
71 | void netbsd32_setregs (struct lwp *, struct exec_package *, u_long stack); | | 71 | void netbsd32_setregs (struct lwp *, struct exec_package *, u_long stack); |
72 | int netbsd32_sigreturn (struct proc *, void *, register_t *); | | 72 | int netbsd32_sigreturn (struct proc *, void *, register_t *); |
73 | void netbsd32_sendsig (const ksiginfo_t *, const sigset_t *); | | 73 | void netbsd32_sendsig (const ksiginfo_t *, const sigset_t *); |
74 | | | 74 | |
75 | extern char netbsd32_esigcode[], netbsd32_sigcode[]; | | 75 | extern char netbsd32_esigcode[], netbsd32_sigcode[]; |
76 | | | 76 | |
77 | /* | | 77 | /* |
78 | * We need to copy out all pointers as 32-bit values. | | 78 | * We need to copy out all pointers as 32-bit values. |
79 | */ | | 79 | */ |
80 | static __inline int | | 80 | static __inline int |
81 | netbsd32_copyargs(l, pack, arginfo, stackp, argp) | | 81 | netbsd32_copyargs(struct lwp *l, struct exec_package *pack, |
82 | struct lwp *l; | | 82 | struct ps_strings *arginfo, char **stackp, void *argp) |
83 | struct exec_package *pack; | | | |
84 | struct ps_strings *arginfo; | | | |
85 | char **stackp; | | | |
86 | void *argp; | | | |
87 | { | | 83 | { |
88 | u_int32_t *cpp = (u_int32_t *)*stackp; | | 84 | u_int32_t *cpp = (u_int32_t *)*stackp; |
89 | netbsd32_pointer_t dp; | | 85 | netbsd32_pointer_t dp; |
90 | u_int32_t nullp = 0; | | 86 | u_int32_t nullp = 0; |
91 | char *sp; | | 87 | char *sp; |
92 | size_t len; | | 88 | size_t len; |
93 | int argc = arginfo->ps_nargvstr; | | 89 | int argc = arginfo->ps_nargvstr; |
94 | int envc = arginfo->ps_nenvstr; | | 90 | int envc = arginfo->ps_nenvstr; |
95 | int error; | | 91 | int error; |
96 | | | 92 | |
97 | if ((error = copyout(&argc, cpp++, sizeof(argc))) != 0) | | 93 | if ((error = copyout(&argc, cpp++, sizeof(argc))) != 0) |
98 | return error; | | 94 | return error; |
99 | | | 95 | |