Module Name:    src
Committed By:   pooka
Date:           Thu Nov 26 21:04:42 UTC 2009

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

Log Message:
Make sure rumpfs is attached on all host platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 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.35 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.36
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.35	Thu Nov 26 20:58:51 2009
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Thu Nov 26 21:04:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs.c,v 1.35 2009/11/26 20:58:51 pooka Exp $	*/
+/*	$NetBSD: rump_vfs.c,v 1.36 2009/11/26 21:04:42 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.35 2009/11/26 20:58:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.36 2009/11/26 21:04:42 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -107,10 +107,20 @@
 void
 rump_vfs_init2()
 {
+	extern struct vfsops rumpfs_vfsops;
 	int rv;
 
 	rootfstype = ROOT_FSTYPE_ANY;
 	root_device = RUMP_VFSROOTDEV;
+
+	/*
+	 * XXX: make sure rumpfs is attached.  The opposite can
+	 * happen e.g. on Linux where the dynlinker doesn't work
+	 * like we would want it to.
+	 */
+	if (!vfs_getopsbyname(MOUNT_RUMPFS))
+		vfs_attach(&rumpfs_vfsops);
+
 	vfs_mountroot();
 	VFS_ROOT(CIRCLEQ_FIRST(&mountlist), &rootvnode);
 

Reply via email to