Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys add a "module_machine", that defaults to machine.
details: https://anonhg.NetBSD.org/src/rev/f5ea142147fc
branches: trunk
changeset: 764339:f5ea142147fc
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Apr 17 05:16:28 2011 +0000
description:
add a "module_machine", that defaults to machine.
allows MD code to override the default subdir for modules.
diffstat:
sys/kern/kern_module.c | 11 +++++++----
sys/sys/module.h | 3 ++-
2 files changed, 9 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 93bb5e068e06 -r f5ea142147fc sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Sun Apr 17 01:29:06 2011 +0000
+++ b/sys/kern/kern_module.c Sun Apr 17 05:16:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_module.c,v 1.77 2011/04/02 08:11:31 mbalmer Exp $ */
+/* $NetBSD: kern_module.c,v 1.78 2011/04/17 05:16:28 mrg Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.77 2011/04/02 08:11:31 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.78 2011/04/17 05:16:28 mrg Exp $");
#define _MODULE_INTERNAL
@@ -60,6 +60,7 @@
#include <machine/stdarg.h>
struct vm_map *module_map;
+char *module_machine;
char module_base[MODULE_BASE_SIZE];
struct modlist module_list = TAILQ_HEAD_INITIALIZER(module_list);
@@ -338,12 +339,14 @@
module_init_md();
#endif
+ if (!module_machine)
+ module_machine = machine;
#if __NetBSD_Version__ / 1000000 % 100 == 99 /* -current */
snprintf(module_base, sizeof(module_base), "/stand/%s/%s/modules",
- machine, osrelease);
+ module_machine, osrelease);
#else /* release */
snprintf(module_base, sizeof(module_base), "/stand/%s/%d.%d/modules",
- machine, __NetBSD_Version__ / 100000000,
+ module_machine, __NetBSD_Version__ / 100000000,
__NetBSD_Version__ / 1000000 % 100);
#endif
diff -r 93bb5e068e06 -r f5ea142147fc sys/sys/module.h
--- a/sys/sys/module.h Sun Apr 17 01:29:06 2011 +0000
+++ b/sys/sys/module.h Sun Apr 17 05:16:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: module.h,v 1.25 2010/08/21 13:17:32 pgoyette Exp $ */
+/* $NetBSD: module.h,v 1.26 2011/04/17 05:16:29 mrg Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -157,6 +157,7 @@
#define MODULE_BASE_SIZE 64
extern char module_base[MODULE_BASE_SIZE];
+extern char *module_machine;
#else /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index