+int
+mmioctl(dev_t dev, u_long cmd, __unused caddr_t data,
+ __unused int flag, __unused struct proc *p)
+{
+ int minnum = minor(dev);
+
+ if (0 == minnum || 1 == minnum) {
+ /* /dev/mem and /dev/kmem */
+#if defined(SECURE_KERNEL)
+ return (ENODEV);
+#else
+ if (0 == setup_kmem)
+ return (EINVAL);
+#endif
+ }
+
+ switch (cmd) {
+ case FIONBIO:
+ case FIOASYNC:
+ /* OK to do nothing: we always return immediately */
+ break;
+ default:
+ return ENODEV;
+ }
+
+ return (0);
+}
+
+int
+mmrw(dev_t dev, struct uio *uio, enum uio_rw rw)