Source-Changes-HG archive

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

[src/trunk]: src/sys adjust to the new copyargs footprint



details:   https://anonhg.NetBSD.org/src/rev/e49f127b9eeb
branches:  trunk
changeset: 513367:e49f127b9eeb
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jul 29 21:22:58 2001 +0000

description:
adjust to the new copyargs footprint

diffstat:

 sys/kern/exec_elf32.c |  20 ++++++++++----------
 sys/sys/exec.h        |  10 +++++-----
 sys/sys/exec_elf.h    |  12 ++++++------
 sys/sys/exec_macho.h  |   6 +++---
 4 files changed, 24 insertions(+), 24 deletions(-)

diffs (130 lines):

diff -r ea6a75884eb0 -r e49f127b9eeb sys/kern/exec_elf32.c
--- a/sys/kern/exec_elf32.c     Sun Jul 29 21:22:42 2001 +0000
+++ b/sys/kern/exec_elf32.c     Sun Jul 29 21:22:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf32.c,v 1.65 2001/07/15 20:52:35 christos Exp $ */
+/*     $NetBSD: exec_elf32.c,v 1.66 2001/07/29 21:22:58 christos Exp $ */
 
 /*-
  * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc.
@@ -104,17 +104,17 @@
  * Copy arguments onto the stack in the normal way, but add some
  * extra information in case of dynamic binding.
  */
-void *
+int
 ELFNAME(copyargs)(struct exec_package *pack, struct ps_strings *arginfo,
-    void *stack, void *argp)
+    char **stackp, void *argp)
 {
        size_t len;
        AuxInfo ai[ELF_AUX_ENTRIES], *a;
        struct elf_args *ap;
+       int error;
 
-       stack = copyargs(pack, arginfo, stack, argp);
-       if (!stack)
-               return NULL;
+       if ((error = copyargs(pack, arginfo, stackp, argp)) != 0)
+               return error;
 
        a = ai;
 
@@ -161,11 +161,11 @@
        a++;
 
        len = (a - ai) * sizeof(AuxInfo);
-       if (copyout(ai, stack, len))
-               return NULL;
-       stack = (caddr_t)stack + len;
+       if ((error = copyout(ai, *stackp, len)) != 0)
+               return error;
+       *stackp = *stackp + len;
 
-       return stack;
+       return 0;
 }
 
 /*
diff -r ea6a75884eb0 -r e49f127b9eeb sys/sys/exec.h
--- a/sys/sys/exec.h    Sun Jul 29 21:22:42 2001 +0000
+++ b/sys/sys/exec.h    Sun Jul 29 21:22:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec.h,v 1.80 2001/07/14 02:08:30 christos Exp $       */
+/*     $NetBSD: exec.h,v 1.81 2001/07/29 21:23:19 christos Exp $       */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -118,8 +118,8 @@
        int     es_prio;                /* entry priority */
        int     es_arglen;              /* Extra argument size in words */
                                        /* Copy arguments on the new stack */
-       void    *(*es_copyargs) __P((struct exec_package *, struct ps_strings *,
-                                   void *, void *));
+       int     (*es_copyargs) __P((struct exec_package *, struct ps_strings *,
+                                  char **, void *));
                                        /* Set registers before execution */
        void    (*es_setregs) __P((struct proc *, struct exec_package *,
                                  u_long));
@@ -199,8 +199,8 @@
 int    vmcmd_map_readvn        __P((struct proc *, struct exec_vmcmd *));
 int    vmcmd_readvn            __P((struct proc *, struct exec_vmcmd *));
 int    vmcmd_map_zero          __P((struct proc *, struct exec_vmcmd *));
-void   *copyargs               __P((struct exec_package *, struct ps_strings *,
-                                    void *, void *));
+int    copyargs                __P((struct exec_package *, struct ps_strings *,
+    char **, void *));
 void   setregs                 __P((struct proc *, struct exec_package *,
                                     u_long));
 int    check_exec              __P((struct proc *, struct exec_package *));
diff -r ea6a75884eb0 -r e49f127b9eeb sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Sun Jul 29 21:22:42 2001 +0000
+++ b/sys/sys/exec_elf.h        Sun Jul 29 21:22:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.52 2001/07/14 02:08:30 christos Exp $   */
+/*     $NetBSD: exec_elf.h,v 1.53 2001/07/29 21:23:19 christos Exp $   */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -731,16 +731,16 @@
 
 #ifdef EXEC_ELF32
 int    exec_elf32_makecmds __P((struct proc *, struct exec_package *));
-void   *elf32_copyargs __P((struct exec_package *, struct ps_strings *,
-           void *, void *));
+int    elf32_copyargs __P((struct exec_package *, struct ps_strings *,
+    char **, void *));
 #endif
 
 #ifdef EXEC_ELF64
 int    exec_elf64_makecmds __P((struct proc *, struct exec_package *));
 int    elf64_read_from __P((struct proc *, struct vnode *, u_long,
-           caddr_t, int));
-void   *elf64_copyargs __P((struct exec_package *, struct ps_strings *,
-           void *, void *));
+    caddr_t, int));
+void   elf64_copyargs __P((struct exec_package *, struct ps_strings *,
+    char **, void *));
 #endif
 
 /* common */
diff -r ea6a75884eb0 -r e49f127b9eeb sys/sys/exec_macho.h
--- a/sys/sys/exec_macho.h      Sun Jul 29 21:22:42 2001 +0000
+++ b/sys/sys/exec_macho.h      Sun Jul 29 21:22:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_macho.h,v 1.1 2001/07/14 02:09:42 christos Exp $  */
+/*     $NetBSD: exec_macho.h,v 1.2 2001/07/29 21:23:19 christos Exp $  */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -244,8 +244,8 @@
 struct ps_strings;
 u_long exec_macho_thread_entry(struct exec_macho_thread_command *);
 int    exec_macho_makecmds __P((struct proc *, struct exec_package *));
-void   *exec_macho_copyargs __P((struct exec_package *, struct ps_strings *,
-    void *, void *));
+int    exec_macho_copyargs __P((struct exec_package *, struct ps_strings *,
+    char **, void *));
 int    exec_macho_setup_stack __P((struct proc *, struct exec_package *));
 #endif /* _KERNEL */
 



Home | Main Index | Thread Index | Old Index