aboutsummaryrefslogtreecommitdiffstats
path: root/module/zcommon/zfs_prop.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:49:16 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:41:58 -0700
commitc28b227942b421ebdc03c9df9a012642fb517223 (patch)
treeec584e21d6fbc819353792d54a7dffb454029111 /module/zcommon/zfs_prop.c
parent00b46022c676e402e3f33ce93ee2983bbad2c46f (diff)
Add linux kernel module support
Setup linux kernel module support, this includes: - zfs context for kernel/user - kernel module build system integration - kernel module macros - kernel module symbol export - kernel module options Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zcommon/zfs_prop.c')
-rw-r--r--module/zcommon/zfs_prop.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c
index f29bcf627..ce03a498c 100644
--- a/module/zcommon/zfs_prop.c
+++ b/module/zcommon/zfs_prop.c
@@ -593,3 +593,38 @@ zfs_prop_align_right(zfs_prop_t prop)
}
#endif
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+
+static int zcommon_init(void) { return 0; }
+static int zcommon_fini(void) { return 0; }
+
+spl_module_init(zcommon_init);
+spl_module_exit(zcommon_fini);
+
+MODULE_DESCRIPTION("Generic ZFS support");
+MODULE_AUTHOR(ZFS_META_AUTHOR);
+MODULE_LICENSE(ZFS_META_LICENSE);
+
+/* zfs dataset property functions */
+EXPORT_SYMBOL(zfs_userquota_prop_prefixes);
+EXPORT_SYMBOL(zfs_prop_init);
+EXPORT_SYMBOL(zfs_prop_get_type);
+EXPORT_SYMBOL(zfs_prop_get_table);
+EXPORT_SYMBOL(zfs_prop_delegatable);
+
+/* Dataset property functions shared between libzfs and kernel. */
+EXPORT_SYMBOL(zfs_prop_default_string);
+EXPORT_SYMBOL(zfs_prop_default_numeric);
+EXPORT_SYMBOL(zfs_prop_readonly);
+EXPORT_SYMBOL(zfs_prop_inheritable);
+EXPORT_SYMBOL(zfs_prop_setonce);
+EXPORT_SYMBOL(zfs_prop_to_name);
+EXPORT_SYMBOL(zfs_name_to_prop);
+EXPORT_SYMBOL(zfs_prop_user);
+EXPORT_SYMBOL(zfs_prop_userquota);
+EXPORT_SYMBOL(zfs_prop_index_to_string);
+EXPORT_SYMBOL(zfs_prop_string_to_index);
+EXPORT_SYMBOL(zfs_prop_valid_for_type);
+
+#endif