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
@@ -139,4 +139,9 @@ enum scope_prefix_types {
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
#define ZFS_MODULE_DESCRIPTION(s) MODULE_DESCRIPTION(s)
#define ZFS_MODULE_AUTHOR(s) MODULE_AUTHOR(s)
#define ZFS_MODULE_LICENSE(s) MODULE_LICENSE(s)
#define ZFS_MODULE_VERSION(s) MODULE_VERSION(s)
#endif /* _MOD_COMPAT_H */