aboutsummaryrefslogtreecommitdiffstats
path: root/module/nvpair/nvpair.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-01 10:41:03 -0700
committerBrian Behlendorf <[email protected]>2019-11-01 10:41:03 -0700
commit4a2ed9001353a895ff84594cb34e9c42fd24edaa (patch)
tree5b491b0d933db97f8d33cd6a02b2f18fed0d5d21 /module/nvpair/nvpair.c
parentbd4dde8ef7b3861b20f12619f8994e037b303040 (diff)
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 <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9542
Diffstat (limited to 'module/nvpair/nvpair.c')
-rw-r--r--module/nvpair/nvpair.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c
index c5bd98ebd..dd8a9420d 100644
--- a/module/nvpair/nvpair.c
+++ b/module/nvpair/nvpair.c
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/strings.h>
#include <rpc/xdr.h>
+#include <sys/mod.h>
#if defined(_KERNEL)
#include <sys/sunddi.h>
@@ -3601,11 +3602,12 @@ nvpair_fini(void)
module_init(nvpair_init);
module_exit(nvpair_fini);
+#endif
-MODULE_DESCRIPTION("Generic name/value pair implementation");
-MODULE_AUTHOR(ZFS_META_AUTHOR);
-MODULE_LICENSE(ZFS_META_LICENSE);
-MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
+ZFS_MODULE_DESCRIPTION("Generic name/value pair implementation");
+ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
+ZFS_MODULE_LICENSE(ZFS_META_LICENSE);
+ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
EXPORT_SYMBOL(nv_alloc_init);
EXPORT_SYMBOL(nv_alloc_reset);
@@ -3720,5 +3722,3 @@ EXPORT_SYMBOL(nvpair_value_uint64_array);
EXPORT_SYMBOL(nvpair_value_string_array);
EXPORT_SYMBOL(nvpair_value_nvlist_array);
EXPORT_SYMBOL(nvpair_value_hrtime);
-
-#endif