Re: kldstat and module ref count

From: Toni Andjelkovic (toni_at_soth.at)
Date: 03/26/04

  • Next message: Bernd Walter: "Re: usbd config file parse behaviour"
    Date: Fri, 26 Mar 2004 07:44:58 +0100
    To: Sam Lawrance <samuel.lawrance@studentmail.newcastle.edu.au>
    
    

    On Fri, Mar 26 2004 (09:15:26 +1100), Sam Lawrance wrote:
    > I've tried to find the answer to this but am stuck. How can I prevent a
    > kld module being unloaded if it is still in use?
    >
    > Filesystem modules give "device busy" if you try to kldunload them while
    > still in use. Any sort of quick pointer in the right direction would be
    > much appreciated.

    You may veto the unload by returning an error > 0 from the module event
    handler. See md_modevent() in sys/dev/md/md.c or vfs_modevent() in
    sys/kern/vfs_init.c for examples.

    Cheers,
    Toni
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Bernd Walter: "Re: usbd config file parse behaviour"