Author: adrian Date: Tue Mar 13 20:27:48 2012 New Revision: 232936 URL: http://svn.freebsd.org/changeset/base/232936
Log: Add module load/unload stubs. Modified: head/sys/kern/subr_acl_nfs4.c head/sys/kern/subr_acl_posix1e.c Modified: head/sys/kern/subr_acl_nfs4.c ============================================================================== --- head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:27:48 2012 (r232936) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <sys/systm.h> #include <sys/mount.h> #include <sys/priv.h> @@ -1367,3 +1369,46 @@ acl_nfs4_check(const struct acl *aclp, i return (0); } + +#ifdef _KERNEL +static int +acl_nfs4_modload(module_t module, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_nfs4_mod = { + "acl_nfs4", + acl_nfs4_modload, + NULL +}; + +/* + * XXX TODO: which subsystem, order? + */ +DECLARE_MODULE(acl_nfs4, acl_nfs4_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_nfs4, 1); +#endif /* _KERNEL */ Modified: head/sys/kern/subr_acl_posix1e.c ============================================================================== --- head/sys/kern/subr_acl_posix1e.c Tue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_posix1e.c Tue Mar 13 20:27:48 2012 (r232936) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <sys/systm.h> #include <sys/mount.h> #include <sys/priv.h> @@ -648,3 +650,42 @@ acl_posix1e_newfilemode(mode_t cmode, st return (mode); } + + +static int +acl_posix1e_modload(module_t mod, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_posix1e_mod = { + "acl_posix1e", + acl_posix1e_modload, + NULL +}; + +DECLARE_MODULE(acl_posix1e, acl_posix1e_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_posix1e, 1); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"