diff options
author | marcel <marcel@FreeBSD.org> | 2013-06-09 23:51:26 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2013-06-09 23:51:26 +0000 |
commit | ac0545a5fe5499c5778d468bbe69f9267b5cfeec (patch) | |
tree | 7031120680c0404d0dd6f70a81f063c0f4269cbf /sys/sys/mount.h | |
parent | 6bae06c63f1840d83bcfab67740917e869efab33 (diff) | |
download | FreeBSD-src-ac0545a5fe5499c5778d468bbe69f9267b5cfeec.zip FreeBSD-src-ac0545a5fe5499c5778d468bbe69f9267b5cfeec.tar.gz |
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
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 a953dae..2938e32 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 */ |