Wrap Linux module macros

MODULE_VERSION is already defined on FreeBSD. Wrap all of the
used MODULE_* macros for the sake of consistency and portability.

Add a user space noop version to reduce the need for _KERNEL ifdefs.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #9542
This commit is contained in:
Matthew Macy
2019-11-01 10:41:03 -07:00
committed by Brian Behlendorf
parent bd4dde8ef7
commit 4a2ed90013
13 changed files with 119 additions and 46 deletions
+7 -7
View File
@@ -1295,10 +1295,13 @@ lua_fini(void)
module_init(lua_init);
module_exit(lua_fini);
MODULE_DESCRIPTION("Lua Interpreter for ZFS");
MODULE_AUTHOR("Lua.org");
MODULE_LICENSE("MIT");
MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
#endif
/* END CSTYLED */
ZFS_MODULE_DESCRIPTION("Lua Interpreter for ZFS");
ZFS_MODULE_AUTHOR("Lua.org");
ZFS_MODULE_LICENSE("MIT");
ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
EXPORT_SYMBOL(lua_absindex);
EXPORT_SYMBOL(lua_atpanic);
@@ -1340,6 +1343,3 @@ EXPORT_SYMBOL(lua_tonumberx);
EXPORT_SYMBOL(lua_touserdata);
EXPORT_SYMBOL(lua_type);
EXPORT_SYMBOL(lua_typename);
#endif
/* END CSTYLED */