Module Name:    src
Committed By:   pooka
Date:           Tue Jun  8 17:17:33 UTC 2010

Modified Files:
        src/sys/rump/librump/rumpvfs: rump_vfs.c

Log Message:
Allow to set a non-standard module_base for host kernel module loading.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpvfs/rump_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/rump_vfs.c
diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.52 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.53
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.52	Wed May 26 21:50:56 2010
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Tue Jun  8 17:17:33 2010
@@ -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);

Reply via email to