Source-Changes-HG archive

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

[src/trunk]: src/sys Change the type of the 'cookie' that holds the state of ...



details:   https://anonhg.NetBSD.org/src/rev/fe764cb39343
branches:  trunk
changeset: 792371:fe764cb39343
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Jan 01 18:57:15 2014 +0000

description:
Change the type of the 'cookie' that holds the state of the core dump file
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.

diffstat:

 sys/arch/alpha/alpha/core_machdep.c         |   7 ++--
 sys/arch/amd64/amd64/netbsd32_machdep.c     |   7 ++--
 sys/arch/arm/arm/core_machdep.c             |   7 ++--
 sys/arch/arm/arm32/netbsd32_machdep.c       |   5 ++-
 sys/arch/epoc32/stand/e32boot/include/elf.h |  11 ++++---
 sys/arch/hppa/hppa/core_machdep.c           |   7 ++--
 sys/arch/m68k/m68k/core_machdep.c           |   7 ++--
 sys/arch/mips/mips/core_machdep.c           |   7 ++--
 sys/arch/mips/mips/netbsd32_machdep.c       |   7 ++--
 sys/arch/powerpc/powerpc/core_machdep.c     |   7 ++--
 sys/arch/sh3/sh3/core_machdep.c             |   7 ++--
 sys/arch/sparc/sparc/core_machdep.c         |   7 ++--
 sys/arch/sparc64/sparc64/core_machdep.c     |   7 ++--
 sys/arch/sparc64/sparc64/netbsd32_machdep.c |   7 ++--
 sys/arch/vax/vax/core_machdep.c             |   7 ++--
 sys/arch/x86/x86/core_machdep.c             |   7 ++--
 sys/compat/netbsd32/netbsd32.h              |   5 ++-
 sys/kern/core_elf32.c                       |  40 ++++++++++++++--------------
 sys/kern/core_netbsd.c                      |  24 ++++++++--------
 sys/kern/kern_core.c                        |   7 ++--
 sys/sys/exec.h                              |  12 +++++---
 sys/sys/exec_elf.h                          |  15 +++++-----
 sys/sys/signalvar.h                         |   5 ++-
 sys/uvm/uvm_coredump.c                      |   9 +++--
 sys/uvm/uvm_extern.h                        |   7 ++--
 25 files changed, 131 insertions(+), 107 deletions(-)

diffs (truncated from 842 to 300 lines):

diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/alpha/alpha/core_machdep.c
--- a/sys/arch/alpha/alpha/core_machdep.c       Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/alpha/alpha/core_machdep.c       Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_machdep.c,v 1.7 2012/02/06 02:14:10 matt Exp $ */
+/* $NetBSD: core_machdep.c,v 1.8 2014/01/01 18:57:15 dsl Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.7 2012/02/06 02:14:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.8 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,7 +51,8 @@
  * Dump the machine specific header information at the start of a core dump.
  */
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *chdr)
 {
        int error;
        struct md_coredump cpustate;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c   Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c   Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.85 2013/12/01 01:05:16 christos Exp $   */
+/*     $NetBSD: netbsd32_machdep.c,v 1.86 2014/01/01 18:57:15 dsl Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.85 2013/12/01 01:05:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.86 2014/01/01 18:57:15 dsl Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -464,7 +464,8 @@
 };
 
 int
-cpu_coredump32(struct lwp *l, void *iocookie, struct core32 *chdr)
+cpu_coredump32(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core32 *chdr)
 {
        struct md_core32 md_core;
        struct coreseg cseg;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/arm/arm/core_machdep.c
--- a/sys/arch/arm/arm/core_machdep.c   Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/arm/arm/core_machdep.c   Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.2 2009/08/15 23:44:58 matt Exp $    */
+/*     $NetBSD: core_machdep.c,v 1.3 2014/01/01 18:57:15 dsl Exp $     */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -37,7 +37,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.2 2009/08/15 23:44:58 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.3 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/core.h>
 #include <sys/exec.h>
@@ -56,7 +56,8 @@
  * Dump the machine specific segment at the start of a core dump.
  */
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *chdr)
 {
        int error;
        struct {
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/arm/arm32/netbsd32_machdep.c
--- a/sys/arch/arm/arm32/netbsd32_machdep.c     Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/arm/arm32/netbsd32_machdep.c     Wed Jan 01 18:57:15 2014 +0000
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.1 2012/08/03 07:59:22 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: netbsd32_machdep.c,v 1.2 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/core.h>
@@ -48,7 +48,8 @@
 const char machine_arch32[] = MACHINE_ARCH;
 
 int
-cpu_coredump32(struct lwp *l, void *iocookie, struct core32 *chdr)
+cpu_coredump32(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core32 *chdr)
 {
        return cpu_coredump(l, iocookie, (struct core *)chdr);
 }
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/epoc32/stand/e32boot/include/elf.h
--- a/sys/arch/epoc32/stand/e32boot/include/elf.h       Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/epoc32/stand/e32boot/include/elf.h       Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf.h,v 1.1 2013/04/28 12:11:27 kiyohara Exp $ */
+/*     $NetBSD: elf.h,v 1.2 2014/01/01 18:57:15 dsl Exp $      */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1196,6 +1196,7 @@
 #endif
 
 struct ps_strings;
+struct coredump_iostate;
 
 #ifdef EXEC_ELF32
 int    exec_elf32_makecmds(struct lwp *, struct exec_package *);
@@ -1203,8 +1204,8 @@
     struct ps_strings *, char **, void *);
 
 int    coredump_elf32(struct lwp *, void *);
-int    coredump_writenote_elf32(struct proc *, void *, Elf32_Nhdr *,
-    const char *, void *);
+int    coredump_writenote_elf32(struct proc *, struct coredump_iostate *,
+    Elf32_Nhdr *, const char *, void *);
 
 int    elf32_check_header(Elf32_Ehdr *, int);
 #endif
@@ -1215,8 +1216,8 @@
     struct ps_strings *, char **, void *);
 
 int    coredump_elf64(struct lwp *, void *);
-int    coredump_writenote_elf64(struct proc *, void *, Elf64_Nhdr *,
-    const char *, void *);
+int    coredump_writenote_elf64(struct proc *, struct coredump_iostate *,
+    Elf64_Nhdr *, const char *, void *);
 
 int    elf64_check_header(Elf64_Ehdr *, int);
 #endif
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/hppa/hppa/core_machdep.c
--- a/sys/arch/hppa/hppa/core_machdep.c Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/hppa/hppa/core_machdep.c Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.4 2009/11/21 15:36:33 rmind Exp $   */
+/*     $NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:15 dsl Exp $     */
 
 /*     $OpenBSD: vm_machdep.c,v 1.25 2001/09/19 20:50:56 mickey Exp $  */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.4 2009/11/21 15:36:33 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -56,7 +56,8 @@
  * Dump the machine specific header information at the start of a core dump.
  */
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *core)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *core)
 {
        struct md_coredump md_core;
        struct coreseg cseg;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/m68k/m68k/core_machdep.c
--- a/sys/arch/m68k/m68k/core_machdep.c Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/m68k/m68k/core_machdep.c Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.4 2011/02/08 20:20:16 rmind Exp $   */
+/*     $NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:15 dsl Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.4 2011/02/08 20:20:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -68,7 +68,8 @@
 };
 
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *chdr)
 {
        struct md_core md_core;
        struct coreseg cseg;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/mips/mips/core_machdep.c
--- a/sys/arch/mips/mips/core_machdep.c Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/mips/mips/core_machdep.c Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.6 2011/06/13 21:32:42 matt Exp $    */
+/*     $NetBSD: core_machdep.c,v 1.7 2014/01/01 18:57:15 dsl Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.6 2011/06/13 21:32:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.7 2014/01/01 18:57:15 dsl Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -64,7 +64,8 @@
  * Dump the machine specific segment at the start of a core dump.
  */
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *chdr)
 {
        int error;
        struct coreseg cseg;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/mips/mips/netbsd32_machdep.c
--- a/sys/arch/mips/mips/netbsd32_machdep.c     Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/mips/mips/netbsd32_machdep.c     Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_machdep.c,v 1.9 2012/05/21 14:15:18 martin Exp $      */
+/*     $NetBSD: netbsd32_machdep.c,v 1.10 2014/01/01 18:57:15 dsl Exp $        */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.9 2012/05/21 14:15:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.10 2014/01/01 18:57:15 dsl Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_coredump.h"
@@ -301,7 +301,8 @@
  * Dump the machine specific segment at the start of a core dump.
  */
 int
-cpu_coredump32(struct lwp *l, void *iocookie, struct core32 *chdr)
+cpu_coredump32(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core32 *chdr)
 {
        int error;
        struct coreseg cseg;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/powerpc/powerpc/core_machdep.c
--- a/sys/arch/powerpc/powerpc/core_machdep.c   Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/powerpc/powerpc/core_machdep.c   Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.8 2011/06/13 21:32:43 matt Exp $    */
+/*     $NetBSD: core_machdep.c,v 1.9 2014/01/01 18:57:16 dsl Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.8 2011/06/13 21:32:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.9 2014/01/01 18:57:16 dsl Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -60,7 +60,8 @@
  * Write the machine-dependent part of a core dump.
  */
 int
-cpu_coredump(struct lwp *l, void *iocookie, struct core *chdr)
+cpu_coredump(struct lwp *l, struct coredump_iostate *iocookie,
+    struct core *chdr)
 {
        struct coreseg cseg;
        struct md_coredump md_core;
diff -r 787ef4b4b84e -r fe764cb39343 sys/arch/sh3/sh3/core_machdep.c
--- a/sys/arch/sh3/sh3/core_machdep.c   Wed Jan 01 18:29:39 2014 +0000
+++ b/sys/arch/sh3/sh3/core_machdep.c   Wed Jan 01 18:57:15 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: core_machdep.c,v 1.4 2011/01/27 00:19:27 uwe Exp $     */
+/*     $NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:16 dsl Exp $     */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.4 2011/01/27 00:19:27 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: core_machdep.c,v 1.5 2014/01/01 18:57:16 dsl Exp $");



Home | Main Index | Thread Index | Old Index