diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2013-06-09 23:51:26 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2013-06-09 23:51:26 +0000 |
commit | 8c7ca16f63f0f70ef6ef1c92c1d9aa435391e786 (patch) | |
tree | 7031120680c0404d0dd6f70a81f063c0f4269cbf /sys/sys/mount.h | |
parent | 2fbad3a1359517cd0ed5d3d0f58c32372d95552f (diff) | |
download | src-8c7ca16f63f0f70ef6ef1c92c1d9aa435391e786.tar.gz src-8c7ca16f63f0f70ef6ef1c92c1d9aa435391e786.zip |
Add vfs_mounted and vfs_unmounted events so that components can be informed
about mount and unmount events. This is used by Juniper to implement a more
optimal implementation of NetBSD's veriexec.
Submitted by: stevek@juniper.net
Obtained from: Juniper Networks, Inc
Notes
Notes:
svn path=/head/; revision=251590
Diffstat (limited to 'sys/sys/mount.h')
-rw-r--r-- | sys/sys/mount.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index a953dae420cd..2938e32bead2 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -39,6 +39,7 @@ #include <sys/lock.h> #include <sys/lockmgr.h> #include <sys/_mutex.h> +#include <sys/eventhandler.h> #endif /* @@ -798,6 +799,17 @@ vfs_statfs_t __vfs_statfs; extern char *mountrootfsname; /* + * Event handlers + */ + +typedef void (*vfs_mounted_notify_fn)(void *, struct mount *, struct vnode *, + struct thread *); +typedef void (*vfs_unmounted_notify_fn)(void *, struct mount *, + struct thread *); +EVENTHANDLER_DECLARE(vfs_mounted, vfs_mounted_notify_fn); +EVENTHANDLER_DECLARE(vfs_unmounted, vfs_unmounted_notify_fn); + +/* * exported vnode operations */ |