Module Name:    src
Committed By:   pooka
Date:           Fri Jan 21 13:08:42 UTC 2011

Modified Files:
        src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_ioctl.c

Log Message:
Don't allow module to init if root is not mounted since the modcmd
wants to traverse the file system.  This *might* fix statically
linking zfs support into the kernel (at least it fixes rump kernel
bootstrap).


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
    src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.6 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.7
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c:1.6	Wed May 19 18:01:26 2010
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_ioctl.c	Fri Jan 21 13:08:42 2011
@@ -4601,6 +4601,9 @@
 	
 	switch (cmd) {
 	case MODULE_CMD_INIT:
+		if (!rootvnode)
+			return EAGAIN;
+
 		printf("WARNING: ZFS on NetBSD is under development\n");
 		availrmem = (uint64_t)physmem * PAGE_SIZE / 1048576;
 		if (availrmem < ZFS_MIN_MEGS * 80 / 100) {

Reply via email to