mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
committed by
Brian Behlendorf
parent
bd4dde8ef7
commit
4a2ed90013
+6
-6
@@ -103,6 +103,7 @@
|
||||
#include <sys/debug.h>
|
||||
#include <sys/avl.h>
|
||||
#include <sys/cmn_err.h>
|
||||
#include <sys/mod.h>
|
||||
|
||||
/*
|
||||
* Small arrays to translate between balance (or diff) values and child indices.
|
||||
@@ -993,7 +994,6 @@ done:
|
||||
}
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <linux/module.h>
|
||||
|
||||
static int __init
|
||||
avl_init(void)
|
||||
@@ -1008,11 +1008,12 @@ avl_fini(void)
|
||||
|
||||
module_init(avl_init);
|
||||
module_exit(avl_fini);
|
||||
#endif
|
||||
|
||||
MODULE_DESCRIPTION("Generic AVL tree implementation");
|
||||
MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
|
||||
ZFS_MODULE_DESCRIPTION("Generic AVL tree implementation");
|
||||
ZFS_MODULE_AUTHOR(ZFS_META_AUTHOR);
|
||||
ZFS_MODULE_LICENSE(ZFS_META_LICENSE);
|
||||
ZFS_MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);
|
||||
|
||||
EXPORT_SYMBOL(avl_create);
|
||||
EXPORT_SYMBOL(avl_find);
|
||||
@@ -1029,4 +1030,3 @@ EXPORT_SYMBOL(avl_remove);
|
||||
EXPORT_SYMBOL(avl_numnodes);
|
||||
EXPORT_SYMBOL(avl_destroy_nodes);
|
||||
EXPORT_SYMBOL(avl_destroy);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user