>> There's a mention in the FBSD hacking guide that a detach() routine >> for a device driver can forcably close all open descriptors for >> its device before it unloads. >> >> How does one do this?
> Check this out (from one of my USB device drivers I haven't yet > forced upon the world): > > /* nuke the vnodes for any processes attached to us. */ > vp = SLIST_FIRST(&sc->dev->si_hlist); > if (vp) > VOP_REVOKE(vp, REVOKEALL); > destroy_dev(sc->dev); > > This will cause all open fds for that device to be revoked. Er... Something is wrong here. destroy_dev() supposedly takes a dev_t which is typedef u_int32_t in <sys/types.h>. Are we using the same OS? I'm working with 4.4-RELEASE. brad To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message