Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs Allow to set a non-standard module_...
details: https://anonhg.NetBSD.org/src/rev/d8ea4fb5b9e7
branches: trunk
changeset: 755533:d8ea4fb5b9e7
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jun 08 17:17:33 2010 +0000
description:
Allow to set a non-standard module_base for host kernel module loading.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diffs (38 lines):
diff -r 910f16d38daf -r d8ea4fb5b9e7 sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Tue Jun 08 17:12:32 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Tue Jun 08 17:17:33 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.52 2010/05/26 21:50:56 pooka Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.53 2010/06/08 17:17:33 pooka Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.52 2010/05/26 21:50:56 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.53 2010/06/08 17:17:33 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -144,7 +144,18 @@
* modules from the host will be autoloaded to rump kernels.
*/
#ifdef _RUMP_NATIVE_ABI
- rump_etfs_register(module_base, module_base, RUMP_ETFS_DIR_SUBDIRS);
+ {
+ char *mbase;
+
+ if (rumpuser_getenv("RUMP_MODULEBASE", buf, sizeof(buf), &error) == 0)
+ mbase = buf;
+ else
+ mbase = module_base;
+
+ if (strlen(mbase) != 0 && *mbase != '0') {
+ rump_etfs_register(mbase, mbase, RUMP_ETFS_DIR_SUBDIRS);
+ }
+ }
#endif
module_init_class(MODULE_CLASS_VFS);
Home |
Main Index |
Thread Index |
Old Index