Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/compat/netbsd32 Found a couple other consumers...
details: https://anonhg.NetBSD.org/src/rev/652a588c9a0d
branches: pgoyette-compat
changeset: 447788:652a588c9a0d
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Jan 24 03:41:48 2019 +0000
description:
Found a couple other consumers of machine32 - adapt them to use the hook
diffstat:
sys/compat/netbsd32/netbsd32_exec_elf32.c | 11 +++++++----
sys/compat/netbsd32/netbsd32_sysctl.c | 9 +++++----
2 files changed, 12 insertions(+), 8 deletions(-)
diffs (84 lines):
diff -r a99a75880dad -r 652a588c9a0d sys/compat/netbsd32/netbsd32_exec_elf32.c
--- a/sys/compat/netbsd32/netbsd32_exec_elf32.c Thu Jan 24 03:27:23 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_exec_elf32.c Thu Jan 24 03:41:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $ */
+/* $NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $ */
/* from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
/*
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40 2016/08/06 15:13:13 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.40.14.1 2019/01/24 03:41:48 pgoyette Exp $");
#define ELFSIZE 32
@@ -72,6 +72,7 @@
#include <sys/signalvar.h>
#include <sys/kauth.h>
#include <sys/namei.h>
+#include <sys/compat_stub.h>
#include <compat/common/compat_util.h>
@@ -108,9 +109,11 @@
ELFNAME2(netbsd32,probe_noteless)(struct lwp *l, struct exec_package *epp,
void *eh, char *itp, vaddr_t *pos)
{
+ const char *m;
+
if (itp && epp->ep_interp == NULL) {
- extern const char machine32[];
- (void)compat_elf_check_interp(epp, itp, machine32);
+ MODULE_HOOK_CALL(netbsd32_machine32_hook, (), machine, m);
+ (void)compat_elf_check_interp(epp, itp, m);
}
#ifdef _LP64
epp->ep_flags |= EXEC_32 | EXEC_FORCEAUX;
diff -r a99a75880dad -r 652a588c9a0d sys/compat/netbsd32/netbsd32_sysctl.c
--- a/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 03:27:23 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_sysctl.c Thu Jan 24 03:41:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $ */
+/* $NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $ */
/*
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.1 2018/06/25 07:25:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.38.2.2 2019/01/24 03:41:48 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ddb.h"
@@ -50,6 +50,7 @@
#include <sys/sysctl.h>
#include <sys/dirent.h>
#include <sys/ktrace.h>
+#include <sys/compat_stub.h>
#include <uvm/uvm_extern.h>
@@ -122,7 +123,7 @@
netbsd32_sysctl_init(void)
{
const struct sysctlnode *_root = &netbsd32_sysctl_root;
- extern const char machine32[];
+ const char *m;
sysctl_createv(&netbsd32_clog, 0, &_root, NULL,
CTLFLAG_PERMANENT,
@@ -173,7 +174,7 @@
sysctl_createv(&netbsd32_clog, 0, &_root, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRING, "machine", NULL,
- NULL, 0, __UNCONST(&machine32), 0,
+ NULL, 0, __UNCONST(m), 0,
CTL_HW, HW_MACHINE, CTL_EOL);
sysctl_createv(&netbsd32_clog, 0, &_root, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READONLY,
Home |
Main Index |
Thread Index |
Old Index