Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 sync with the regular method; no functio...
details: https://anonhg.NetBSD.org/src/rev/684c4ed759d4
branches: trunk
changeset: 333241:684c4ed759d4
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 24 21:07:55 2014 +0000
description:
sync with the regular method; no functional diff
diffstat:
sys/compat/netbsd32/netbsd32_exec.h | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diffs (58 lines):
diff -r a4488aed6e7a -r 684c4ed759d4 sys/compat/netbsd32/netbsd32_exec.h
--- a/sys/compat/netbsd32/netbsd32_exec.h Fri Oct 24 18:29:20 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_exec.h Fri Oct 24 21:07:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_exec.h,v 1.31 2009/12/10 14:13:53 matt Exp $ */
+/* $NetBSD: netbsd32_exec.h,v 1.32 2014/10/24 21:07:55 christos Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -94,20 +94,28 @@
int envc = arginfo->ps_nenvstr;
int error;
+ NETBSD32PTR32(dp, cpp +
+ 1 + /* int argc */
+ argc + /* char *argv[] */
+ 1 + /* \0 */
+ envc + /* char *env[] */
+ 1 + /* \0 */
+ /* XXX auxinfo multiplied by ptr size? */
+ pack->ep_esch->es_arglen); /* auxinfo */
+ sp = argp;
+
if ((error = copyout(&argc, cpp++, sizeof(argc))) != 0)
return error;
- NETBSD32PTR32(dp, cpp + argc + envc + 2 + pack->ep_esch->es_arglen);
- sp = argp;
-
/* XXX don't copy them out, remap them! */
/* remember location of argv for later */
arginfo->ps_argvstr = (char **)(u_long)cpp;
for (; --argc >= 0; sp += len, NETBSD32PTR32PLUS(dp, len)) {
- if ((error = copyout(&dp, cpp++, sizeof(dp))) != 0 ||
- (error = copyoutstr(sp, NETBSD32PTR64(dp),
- ARG_MAX, &len)) != 0)
+ if ((error = copyout(&dp, cpp++, sizeof(dp))) != 0)
+ return error;
+ if ((error = copyoutstr(sp, NETBSD32PTR64(dp),
+ ARG_MAX, &len)) != 0)
return error;
}
if ((error = copyout(&nullp, cpp++, sizeof(nullp))) != 0)
@@ -117,9 +125,10 @@
arginfo->ps_envstr = (char **)(u_long)cpp;
for (; --envc >= 0; sp += len, NETBSD32PTR32PLUS(dp, len)) {
- if ((error = copyout(&dp, cpp++, sizeof(dp))) != 0 ||
- (error = copyoutstr(sp, NETBSD32PTR64(dp),
- ARG_MAX, &len)) != 0)
+ if ((error = copyout(&dp, cpp++, sizeof(dp))) != 0)
+ return error;
+ if ((error = copyoutstr(sp, NETBSD32PTR64(dp),
+ ARG_MAX, &len)) != 0)
return error;
}
if ((error = copyout(&nullp, cpp++, sizeof(nullp))) != 0)
Home |
Main Index |
Thread Index |
Old Index