Source-Changes-HG archive

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

[src/trunk]: src/sys/kern ANSI'ify.



details:   https://anonhg.NetBSD.org/src/rev/de2d10115faa
branches:  trunk
changeset: 495595:de2d10115faa
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Aug 01 04:57:28 2000 +0000

description:
ANSI'ify.

diffstat:

 sys/kern/exec_aout.c       |   22 ++------
 sys/kern/exec_ecoff.c      |   31 +++---------
 sys/kern/exec_elf32.c      |   82 +++++++++++-----------------------
 sys/kern/exec_elf_common.c |    6 +-
 sys/kern/exec_script.c     |    6 +-
 sys/kern/exec_subr.c       |   37 ++++-----------
 sys/kern/kern_clock.c      |   54 ++++++++--------------
 sys/kern/kern_exec.c       |   18 ++-----
 sys/kern/kern_exit.c       |   25 ++-------
 sys/kern/kern_fork.c       |   30 ++---------
 sys/kern/kern_ktrace.c     |  106 ++++++++++++--------------------------------
 11 files changed, 125 insertions(+), 292 deletions(-)

diffs (truncated from 1045 to 300 lines):

diff -r db2eddccd580 -r de2d10115faa sys/kern/exec_aout.c
--- a/sys/kern/exec_aout.c      Tue Aug 01 04:17:09 2000 +0000
+++ b/sys/kern/exec_aout.c      Tue Aug 01 04:57:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_aout.c,v 1.18 2000/06/27 17:41:07 mrg Exp $       */
+/*     $NetBSD: exec_aout.c,v 1.19 2000/08/01 04:57:28 thorpej Exp $   */
 
 /*
  * Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -51,9 +51,7 @@
  */
 
 int
-exec_aout_makecmds(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_aout_makecmds(struct proc *p, struct exec_package *epp)
 {
        u_long midmag, magic;
        u_short mid;
@@ -100,9 +98,7 @@
  */
 
 int
-exec_aout_prep_zmagic(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_aout_prep_zmagic(struct proc *p, struct exec_package *epp)
 {
        struct exec *execp = epp->ep_hdr;
 
@@ -149,9 +145,7 @@
  */
 
 int
-exec_aout_prep_nmagic(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_aout_prep_nmagic(struct proc *p, struct exec_package *epp)
 {
        struct exec *execp = epp->ep_hdr;
        long bsize, baddr;
@@ -187,9 +181,7 @@
  */
 
 int
-exec_aout_prep_omagic(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_aout_prep_omagic(struct proc *p, struct exec_package *epp)
 {
        struct exec *execp = epp->ep_hdr;
        long dsize, bsize, baddr;
@@ -239,9 +231,7 @@
  */
 
 int
-exec_aout_setup_stack(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_aout_setup_stack(struct proc *p, struct exec_package *epp)
 {
 
        epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
diff -r db2eddccd580 -r de2d10115faa sys/kern/exec_ecoff.c
--- a/sys/kern/exec_ecoff.c     Tue Aug 01 04:17:09 2000 +0000
+++ b/sys/kern/exec_ecoff.c     Tue Aug 01 04:57:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_ecoff.c,v 1.12 2000/06/27 17:41:08 mrg Exp $      */
+/*     $NetBSD: exec_ecoff.c,v 1.13 2000/08/01 04:57:28 thorpej Exp $  */
 
 /*
  * Copyright (c) 1994 Adam Glass
@@ -54,9 +54,7 @@
  * package.
  */
 int
-exec_ecoff_makecmds(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_ecoff_makecmds(struct proc *p, struct exec_package *epp)
 {
        int error;
        struct ecoff_exechdr *execp = epp->ep_hdr;
@@ -121,9 +119,7 @@
  * stack setup functions.  They might have errors to return.
  */
 int
-exec_ecoff_setup_stack(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+exec_ecoff_setup_stack(struct proc *p, struct exec_package *epp)
 {
 
        epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
@@ -155,11 +151,8 @@
  * exec_ecoff_prep_omagic(): Prepare a ECOFF OMAGIC binary's exec package
  */
 int
-exec_ecoff_prep_omagic(p, epp, execp, vp)
-       struct proc *p;
-       struct exec_package *epp;
-       struct ecoff_exechdr *execp;
-       struct vnode *vp;
+exec_ecoff_prep_omagic(struct proc *p, struct exec_package *epp,
+    struct ecoff_exechdr *execp, struct vnode *vp)
 {
        struct ecoff_aouthdr *eap = &execp->a;
 
@@ -189,11 +182,8 @@
  *                           package.
  */
 int
-exec_ecoff_prep_nmagic(p, epp, execp, vp)
-       struct proc *p;
-       struct exec_package *epp;
-       struct ecoff_exechdr *execp;
-       struct vnode *vp;
+exec_ecoff_prep_nmagic(struct proc *p, struct exec_package *epp,
+    struct ecoff_exechdr *execp, struct vnode *vp)
 {
        struct ecoff_aouthdr *eap = &execp->a;
 
@@ -232,11 +222,8 @@
  * text, data, bss, and stack segments.
  */
 int
-exec_ecoff_prep_zmagic(p, epp, execp, vp)
-       struct proc *p;
-       struct exec_package *epp;
-       struct ecoff_exechdr *execp;
-       struct vnode *vp;
+exec_ecoff_prep_zmagic(struct proc *p, struct exec_package *epp,
+    struct ecoff_exechdr *execp, struct vnode *vp)
 {
        struct ecoff_aouthdr *eap = &execp->a;
 
diff -r db2eddccd580 -r de2d10115faa sys/kern/exec_elf32.c
--- a/sys/kern/exec_elf32.c     Tue Aug 01 04:17:09 2000 +0000
+++ b/sys/kern/exec_elf32.c     Tue Aug 01 04:57:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf32.c,v 1.53 2000/07/13 02:35:25 matt Exp $     */
+/*     $NetBSD: exec_elf32.c,v 1.54 2000/08/01 04:57:28 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -115,16 +115,16 @@
 #include <compat/freebsd/freebsd_exec.h>
 #endif
 
-int    ELFNAME(check_header) __P((Elf_Ehdr *, int));
-int    ELFNAME(load_file) __P((struct proc *, struct exec_package *, char *,
-           struct exec_vmcmd_set *, u_long *, struct elf_args *, Elf_Addr *));
-void   ELFNAME(load_psection) __P((struct exec_vmcmd_set *, struct vnode *,
-           const Elf_Phdr *, Elf_Addr *, u_long *, int *, int));
+int    ELFNAME(check_header)(Elf_Ehdr *, int);
+int    ELFNAME(load_file)(struct proc *, struct exec_package *, char *,
+           struct exec_vmcmd_set *, u_long *, struct elf_args *, Elf_Addr *);
+void   ELFNAME(load_psection)(struct exec_vmcmd_set *, struct vnode *,
+           const Elf_Phdr *, Elf_Addr *, u_long *, int *, int);
 
-int ELFNAME2(netbsd,signature) __P((struct proc *, struct exec_package *,
-    Elf_Ehdr *));
-static int ELFNAME2(netbsd,probe) __P((struct proc *, struct exec_package *,
-    Elf_Ehdr *, char *, Elf_Addr *));
+int ELFNAME2(netbsd,signature)(struct proc *, struct exec_package *,
+    Elf_Ehdr *);
+static int ELFNAME2(netbsd,probe)(struct proc *, struct exec_package *,
+    Elf_Ehdr *, char *, Elf_Addr *);
 
 extern char sigcode[], esigcode[];
 #ifdef SYSCALL_DEBUG
@@ -150,8 +150,8 @@
        esigcode,
 };
 
-int (*ELFNAME(probe_funcs)[]) __P((struct proc *, struct exec_package *,
-    Elf_Ehdr *, char *, Elf_Addr *)) = {
+int (*ELFNAME(probe_funcs)[])(struct proc *, struct exec_package *,
+    Elf_Ehdr *, char *, Elf_Addr *) = {
 #if defined(COMPAT_NETBSD32) && (ELFSIZE == 32)
            /* This one should go first so it matches instead of netbsd */
        ELFNAME2(netbsd32,probe),
@@ -180,11 +180,8 @@
  * extra information in case of dynamic binding.
  */
 void *
-ELFNAME(copyargs)(pack, arginfo, stack, argp)
-       struct exec_package *pack;
-       struct ps_strings *arginfo;
-       void *stack;
-       void *argp;
+ELFNAME(copyargs)(struct exec_package *pack, struct ps_strings *arginfo,
+    void *stack, void *argp)
 {
        size_t len;
        AuxInfo ai[ELF_AUX_ENTRIES], *a;
@@ -252,9 +249,7 @@
  * Check header for validity; return 0 of ok ENOEXEC if error
  */
 int
-ELFNAME(check_header)(eh, type)
-       Elf_Ehdr *eh;
-       int type;
+ELFNAME(check_header)(Elf_Ehdr *eh, int type)
 {
 
        if (memcmp(eh->e_ident, ELFMAG, SELFMAG) != 0 ||
@@ -281,14 +276,8 @@
  * Load a psection at the appropriate address
  */
 void
-ELFNAME(load_psection)(vcset, vp, ph, addr, size, prot, flags)
-       struct exec_vmcmd_set *vcset;
-       struct vnode *vp;
-       const Elf_Phdr *ph;
-       Elf_Addr *addr;
-       u_long *size;
-       int *prot;
-       int flags;
+ELFNAME(load_psection)(struct exec_vmcmd_set *vcset, struct vnode *vp,
+    const Elf_Phdr *ph, Elf_Addr *addr, u_long *size, int *prot, int flags)
 {
        u_long uaddr, msize, psize, rm, rf;
        long diff, offset;
@@ -356,12 +345,8 @@
  *     Read from vnode into buffer at offset.
  */
 int
-ELFNAME(read_from)(p, vp, off, buf, size)
-       struct vnode *vp;
-       u_long off;
-       struct proc *p;
-       caddr_t buf;
-       int size;
+ELFNAME(read_from)(struct proc *p, struct vnode *vp, u_long off,
+    caddr_t buf, int size)
 {
        int error;
        size_t resid;
@@ -385,14 +370,9 @@
  * so it might be used externally.
  */
 int
-ELFNAME(load_file)(p, epp, path, vcset, entry, ap, last)
-       struct proc *p;
-       struct exec_package *epp;
-       char *path;
-       struct exec_vmcmd_set *vcset;
-       u_long *entry;
-       struct elf_args *ap;
-       Elf_Addr *last;
+ELFNAME(load_file)(struct proc *p, struct exec_package *epp, char *path,
+    struct exec_vmcmd_set *vcset, u_long *entry, struct elf_args *ap,
+    Elf_Addr *last)
 {
        int error, i;
        struct nameidata nd;
@@ -534,9 +514,7 @@
  * text, data, bss, and stack segments.
  */
 int
-ELFNAME2(exec,makecmds)(p, epp)
-       struct proc *p;
-       struct exec_package *epp;
+ELFNAME2(exec,makecmds)(struct proc *p, struct exec_package *epp)
 {
        Elf_Ehdr *eh = epp->ep_hdr;
        Elf_Phdr *ph, *pp;
@@ -748,10 +726,8 @@
 }
 
 int
-ELFNAME2(netbsd,signature)(p, epp, eh)
-       struct proc *p;
-       struct exec_package *epp;
-       Elf_Ehdr *eh;
+ELFNAME2(netbsd,signature)(struct proc *p, struct exec_package *epp,
+    Elf_Ehdr *eh)
 {
        Elf_Phdr *hph, *ph;
        Elf_Nhdr *np = NULL;
@@ -807,12 +783,8 @@
 }
 
 static int
-ELFNAME2(netbsd,probe)(p, epp, eh, itp, pos)
-       struct proc *p;
-       struct exec_package *epp;
-       Elf_Ehdr *eh;
-       char *itp;
-       Elf_Addr *pos;
+ELFNAME2(netbsd,probe)(struct proc *p, struct exec_package *epp,
+    Elf_Ehdr *eh, char *itp, Elf_Addr *pos)
 {
        int error;
 
diff -r db2eddccd580 -r de2d10115faa sys/kern/exec_elf_common.c
--- a/sys/kern/exec_elf_common.c        Tue Aug 01 04:17:09 2000 +0000
+++ b/sys/kern/exec_elf_common.c        Tue Aug 01 04:57:28 2000 +0000



Home | Main Index | Thread Index | Old Index