Subject: Functional VOP_IOCTL
To: None <tech-kern@netbsd.org>
From: Konrad Schroder <perseant@hhhh.org>
List: tech-kern
Date: 02/20/2003 15:52:42
One of the things I'd like to do with LFS is to make the system calls into
ioctl calls, which in theory should let LFS be loaded as an LKM.  No other
filesystem (except fifofs and specfs) has VOP_IOCTL defined as anything
other than a stub, though, and I find that even if it is defined the ioctl
still returns with EPASSTHROUGH.

Would anyone object if I let ioctls to VREG and VDIR fall through to the
VOP_IOCTL case?
						Konrad Schroder
						perseant@hhhh.org

Index: vfs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_vnops.c,v
retrieving revision 1.62
diff -u -r1.62 vfs_vnops.c
--- vfs_vnops.c	2003/02/01 07:23:56	1.62
+++ vfs_vnops.c	2003/02/20 23:43:54
@@ -703,9 +703,6 @@
 			return (0);			/* XXX */
 		/* fall into ... */

-	default:
-		return (EPASSTHROUGH);
-
 	case VFIFO:
 	case VCHR:
 	case VBLK:
@@ -717,6 +714,9 @@
 			VREF(vp);
 		}
 		return (error);
+
+	default:
+		return (EPASSTHROUGH);
 	}
 }