Sun Mar 8 04:17:50 2020 UTC ()
fix indentation.  NFCI


(pgoyette)
diff -r1.17 -r1.18 src/sys/compat/netbsd32/netbsd32_mod.c

cvs diff -r1.17 -r1.18 src/sys/compat/netbsd32/netbsd32_mod.c (expand / switch to unified diff)

--- src/sys/compat/netbsd32/netbsd32_mod.c 2020/03/08 00:53:12 1.17
+++ src/sys/compat/netbsd32/netbsd32_mod.c 2020/03/08 04:17:49 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: netbsd32_mod.c,v 1.17 2020/03/08 00:53:12 pgoyette Exp $ */ 1/* $NetBSD: netbsd32_mod.c,v 1.18 2020/03/08 04:17:49 pgoyette Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software developed for The NetBSD Foundation 7 * This code is derived from software developed for The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -49,27 +49,27 @@ @@ -49,27 +49,27 @@
49 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 49 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
50 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 50 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
51 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 51 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
52 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 52 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
53 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 53 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
54 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 54 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
55 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 55 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
56 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 56 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
57 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 57 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
58 * POSSIBILITY OF SUCH DAMAGE. 58 * POSSIBILITY OF SUCH DAMAGE.
59 */ 59 */
60 60
61#include <sys/cdefs.h> 61#include <sys/cdefs.h>
62__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.17 2020/03/08 00:53:12 pgoyette Exp $"); 62__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.18 2020/03/08 04:17:49 pgoyette Exp $");
63 63
64#ifdef _KERNEL_OPT 64#ifdef _KERNEL_OPT
65#include "opt_execfmt.h" 65#include "opt_execfmt.h"
66#endif 66#endif
67 67
68#ifndef ELFSIZE 68#ifndef ELFSIZE
69#define ELFSIZE ARCH_ELFSIZE 69#define ELFSIZE ARCH_ELFSIZE
70#endif 70#endif
71 71
72#include <sys/param.h> 72#include <sys/param.h>
73#include <sys/module.h> 73#include <sys/module.h>
74#include <sys/exec.h> 74#include <sys/exec.h>
75#include <sys/exec_elf.h> 75#include <sys/exec_elf.h>
@@ -163,27 +163,28 @@ static int @@ -163,27 +163,28 @@ static int
163compat_netbsd32_modcmd(modcmd_t cmd, void *arg) 163compat_netbsd32_modcmd(modcmd_t cmd, void *arg)
164{ 164{
165 int error; 165 int error;
166 166
167 switch (cmd) { 167 switch (cmd) {
168 case MODULE_CMD_INIT: 168 case MODULE_CMD_INIT:
169 error = exec_add(netbsd32_execsw, 169 error = exec_add(netbsd32_execsw,
170 __arraycount(netbsd32_execsw)); 170 __arraycount(netbsd32_execsw));
171 if (error == 0) { 171 if (error == 0) {
172 netbsd32_sysctl_init(); 172 netbsd32_sysctl_init();
173 netbsd32_machdep_md_init(); 173 netbsd32_machdep_md_init();
174 netbsd32_kern_proc_32_init(); 174 netbsd32_kern_proc_32_init();
175#if defined(__amd64__) 175#if defined(__amd64__)
176 MODULE_HOOK_SET(amd64_oosyscall_hook, amd64_oosyscall_handle); 176 MODULE_HOOK_SET(amd64_oosyscall_hook,
 177 amd64_oosyscall_handle);
177#endif 178#endif
178 } 179 }
179 return error; 180 return error;
180 181
181 case MODULE_CMD_FINI: 182 case MODULE_CMD_FINI:
182#if defined(__amd64__) 183#if defined(__amd64__)
183 MODULE_HOOK_UNSET(amd64_oosyscall_hook); 184 MODULE_HOOK_UNSET(amd64_oosyscall_hook);
184#endif 185#endif
185 netbsd32_machdep_md_fini(); 186 netbsd32_machdep_md_fini();
186 netbsd32_sysctl_fini(); 187 netbsd32_sysctl_fini();
187 netbsd32_kern_proc_32_fini(); 188 netbsd32_kern_proc_32_fini();
188 189
189 error = exec_remove(netbsd32_execsw, 190 error = exec_remove(netbsd32_execsw,