Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Initialise struct emul members by name (it is readable n...
details: https://anonhg.NetBSD.org/src/rev/fab764d36e55
branches: trunk
changeset: 748478:fab764d36e55
user: rmind <rmind%NetBSD.org@localhost>
date: Sun Oct 25 01:14:03 2009 +0000
description:
Initialise struct emul members by name (it is readable now and one can search
them in the tree).
diffstat:
sys/compat/linux/common/linux_exec.c | 62 +++++++++++++--------------
sys/compat/linux32/common/linux32_exec.c | 60 +++++++++++++-------------
sys/compat/netbsd32/netbsd32_netbsd.c | 73 +++++++++++++++----------------
sys/kern/kern_exec.c | 67 ++++++++++++++--------------
4 files changed, 129 insertions(+), 133 deletions(-)
diffs (truncated from 379 to 300 lines):
diff -r 2d411f7ef39a -r fab764d36e55 sys/compat/linux/common/linux_exec.c
--- a/sys/compat/linux/common/linux_exec.c Sun Oct 25 01:09:09 2009 +0000
+++ b/sys/compat/linux/common/linux_exec.c Sun Oct 25 01:14:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_exec.c,v 1.112 2009/03/15 15:55:51 cegger Exp $ */
+/* $NetBSD: linux_exec.c,v 1.113 2009/10/25 01:14:03 rmind Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.112 2009/03/15 15:55:51 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_exec.c,v 1.113 2009/10/25 01:14:03 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,42 +90,40 @@
struct uvm_object *emul_linux_object;
struct emul emul_linux = {
- "linux",
- "/emul/linux",
+ .e_name = "linux",
+ .e_path = "/emul/linux",
#ifndef __HAVE_MINIMAL_EMUL
- 0,
- (const int *)native_to_linux_errno,
- LINUX_SYS_syscall,
- LINUX_SYS_NSYSENT,
+ .e_flags = 0,
+ .e_errno = (const int *)native_to_linux_errno,
+ .e_nosys = LINUX_SYS_syscall,
+ .e_nsysent = LINUX_SYS_NSYSENT,
#endif
- linux_sysent,
- linux_syscallnames,
- linux_sendsig,
- linux_trapsignal,
- NULL,
- linux_sigcode,
- linux_esigcode,
- &emul_linux_object,
- linux_setregs,
- linux_e_proc_exec,
- linux_e_proc_fork,
- linux_e_proc_exit,
- NULL,
- NULL,
+ .e_sysent = linux_sysent,
+ .e_syscallnames = linux_syscallnames,
+ .e_sendsig = linux_sendsig,
+ .e_trapsignal = linux_trapsignal,
+ .e_tracesig = NULL,
+ .e_sigcode = linux_sigcode,
+ .e_esigcode = linux_esigcode,
+ .e_sigobject = &emul_linux_object,
+ .e_setregs = linux_setregs,
+ .e_proc_exec = linux_e_proc_exec,
+ .e_proc_fork = linux_e_proc_fork,
+ .e_proc_exit = linux_e_proc_exit,
+ .e_lwp_fork = NULL,
+ .e_lwp_exit = NULL,
#ifdef __HAVE_SYSCALL_INTERN
- linux_syscall_intern,
+ .e_syscall_intern = linux_syscall_intern,
#else
#error Implement __HAVE_SYSCALL_INTERN for this platform
#endif
- NULL,
- NULL,
-
- uvm_default_mapaddr,
-
- linux_usertrap,
- NULL, /* e_sa */
- 0,
- NULL, /* e_startlwp */
+ .e_sysctlovly = NULL,
+ .e_fault = NULL,
+ .e_vm_default_addr = uvm_default_mapaddr,
+ .e_usertrap = linux_usertrap,
+ .e_sa = NULL,
+ .e_ucsize = 0,
+ .e_startlwp = NULL
};
static void
diff -r 2d411f7ef39a -r fab764d36e55 sys/compat/linux32/common/linux32_exec.c
--- a/sys/compat/linux32/common/linux32_exec.c Sun Oct 25 01:09:09 2009 +0000
+++ b/sys/compat/linux32/common/linux32_exec.c Sun Oct 25 01:14:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_exec.c,v 1.18 2009/03/14 21:04:18 dsl Exp $ */
+/* $NetBSD: linux32_exec.c,v 1.19 2009/10/25 01:14:03 rmind Exp $ */
/*-
* Copyright (c) 1994-2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.18 2009/03/14 21:04:18 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_exec.c,v 1.19 2009/10/25 01:14:03 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,36 +90,36 @@
struct uvm_object *emul_linux32_object;
struct emul emul_linux32 = {
- "linux32",
- "/emul/linux32",
+ .e_name = "linux32",
+ .e_path = "/emul/linux32",
#ifndef __HAVE_MINIMAL_EMUL
- 0,
- NULL,
- LINUX32_SYS_syscall,
- LINUX32_SYS_NSYSENT,
+ .e_flags = 0,
+ .e_errno = NULL,
+ .e_nosys = LINUX32_SYS_syscall,
+ .e_nsysent = LINUX32_SYS_NSYSENT,
#endif
- linux32_sysent,
- linux32_syscallnames,
- linux32_sendsig,
- trapsignal,
- NULL,
- linux32_sigcode,
- linux32_esigcode,
- &emul_linux32_object,
- linux32_setregs,
- linux32_e_proc_exec,
- linux32_e_proc_fork,
- linux32_e_proc_exit,
- NULL,
- NULL,
- linux32_syscall_intern,
- NULL,
- NULL,
- netbsd32_vm_default_addr,
- NULL,
- NULL,
- 0,
- NULL
+ .e_sysent = linux32_sysent,
+ .e_syscallnames = linux32_syscallnames,
+ .e_sendsig = linux32_sendsig,
+ .e_trapsignal = trapsignal,
+ .e_tracesig = NULL,
+ .e_sigcode = linux32_sigcode,
+ .e_esigcode = linux32_esigcode,
+ .e_sigobject = &emul_linux32_object,
+ .e_setregs = linux32_setregs,
+ .e_proc_exec = linux32_e_proc_exec,
+ .e_proc_fork = linux32_e_proc_fork,
+ .e_proc_exit = linux32_e_proc_exit,
+ .e_lwp_fork = NULL,
+ .e_lwp_exit = NULL,
+ .e_syscall_intern = linux32_syscall_intern,
+ .e_sysctlovly = NULL,
+ .e_fault = NULL,
+ .e_vm_default_addr = netbsd32_vm_default_addr,
+ .e_usertrap = NULL,
+ .e_sa = NULL,
+ .e_ucsize = 0,
+ .e_startlwp = NULL
};
static void
diff -r 2d411f7ef39a -r fab764d36e55 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c Sun Oct 25 01:09:09 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c Sun Oct 25 01:14:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_netbsd.c,v 1.158 2009/08/09 22:49:01 haad Exp $ */
+/* $NetBSD: netbsd32_netbsd.c,v 1.159 2009/10/25 01:14:03 rmind Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.158 2009/08/09 22:49:01 haad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.159 2009/10/25 01:14:03 rmind Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -133,55 +133,54 @@
};
struct emul emul_netbsd32 = {
- "netbsd32",
- "/emul/netbsd32",
+ .e_name = "netbsd32",
+ .e_path = "/emul/netbsd32",
#ifndef __HAVE_MINIMAL_EMUL
- 0,
- NULL,
- NETBSD32_SYS_netbsd32_syscall,
- NETBSD32_SYS_NSYSENT,
+ .e_flags = 0,
+ .e_errno = NULL,
+ .e_nosys = NETBSD32_SYS_netbsd32_syscall,
+ .e_nsysent = NETBSD32_SYS_NSYSENT,
#endif
- netbsd32_sysent,
+ .e_sysent = netbsd32_sysent,
#ifdef SYSCALL_DEBUG
- netbsd32_syscallnames,
+ .e_syscallnames = netbsd32_syscallnames,
#else
- NULL,
+ .e_syscallnames = NULL,
#endif
- netbsd32_sendsig,
- trapsignal,
- NULL,
+ .e_sendsig = netbsd32_sendsig,
+ .e_trapsignal = trapsignal,
+ .e_tracesig = NULL,
#ifdef COMPAT_16
- netbsd32_sigcode,
- netbsd32_esigcode,
- &emul_netbsd32_object,
+ .e_sigcode = netbsd32_sigcode,
+ .e_esigcode = netbsd32_esigcode,
+ .e_sigobject = &emul_netbsd32_object,
#else
- NULL,
- NULL,
- NULL,
+ .e_sigcode = NULL,
+ .e_esigcode = NULL,
+ .e_sigobject = NULL,
#endif
- netbsd32_setregs,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ .e_setregs = netbsd32_setregs,
+ .e_proc_exec = NULL,
+ .e_proc_fork = NULL,
+ .e_proc_exit = NULL,
+ .e_lwp_fork = NULL,
+ .e_lwp_exit = NULL,
#ifdef __HAVE_SYSCALL_INTERN
- netbsd32_syscall_intern,
+ .e_syscall_intern = netbsd32_syscall_intern,
#else
- syscall,
+ .e_syscall = syscall,
#endif
- &netbsd32_sysctl_root,
- NULL,
-
- netbsd32_vm_default_addr,
- NULL,
+ .e_sysctlovly = &netbsd32_sysctl_root,
+ .e_fault = NULL,
+ .e_vm_default_addr = netbsd32_vm_default_addr,
+ .e_usertrap = NULL,
#ifdef COMPAT_40
- &saemul_netbsd32,
+ .e_sa = &saemul_netbsd32,
#else
- NULL,
+ .e_sa = NULL,
#endif
- sizeof(ucontext32_t),
- startlwp32,
+ .e_ucsize = sizeof(ucontext32_t),
+ .e_startlwp = startlwp32
};
/*
diff -r 2d411f7ef39a -r fab764d36e55 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Sun Oct 25 01:09:09 2009 +0000
+++ b/sys/kern/kern_exec.c Sun Oct 25 01:14:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.290 2009/08/06 21:33:54 dsl Exp $ */
+/* $NetBSD: kern_exec.c,v 1.291 2009/10/25 01:14:03 rmind Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.290 2009/08/06 21:33:54 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.291 2009/10/25 01:14:03 rmind Exp $");
#include "opt_ktrace.h"
#include "opt_modular.h"
@@ -159,49 +159,48 @@
Home |
Main Index |
Thread Index |
Old Index