--- src/sys/vfs/specfs/spec_vnops.c 2004/10/12 19:21:09 1.21 +++ src/sys/vfs/specfs/spec_vnops.c 2004/11/12 00:09:50 1.22 @@ -267,6 +267,16 @@ spec_open(struct vop_open_args *ap) dev_dname(dev), cp); } } + + /* + * If we were handed a file pointer we may be able to install a + * shortcut which issues device read and write operations directly + * from the fileops rather then having to go through spec_read() + * and spec_write(). + */ + if (ap->a_fp) + vn_setspecops(ap->a_fp); + if (dev_ref_debug) printf("spec_open: %s %d\n", dev->si_name, vp->v_opencount); done: