From 99e349db92008ee61dad5a612056cf0fdecb3896 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 4 Dec 2013 10:32:08 -0800 Subject: [PATCH] Add module versioning Use the standard Linux MODULE_VERSION macro to expose the installed zavl, znvpair, zunicode, zcommon, zfs, and zpios module versions. This will also automatically add a checksum of the .c files and headers in "srcversion". See: /sys/module/zavl/version /sys/module/zavl/srcversion /sys/module/znvpair/version /sys/module/znvpair/srcversion /sys/module/zunicode/version /sys/module/zunicode/srcversion /sys/module/zcommon/version /sys/module/zcommon/srcversion /sys/module/zfs/version /sys/module/zfs/srcversion /sys/module/zpios/version /sys/module/zpios/srcversion Signed-off-by: Brian Behlendorf Closes #1923 --- module/avl/avl.c | 1 + module/nvpair/nvpair.c | 1 + module/unicode/u8_textprep.c | 1 + module/zcommon/zfs_prop.c | 1 + module/zfs/zfs_ioctl.c | 1 + module/zpios/pios.c | 1 + 6 files changed, 6 insertions(+) diff --git a/module/avl/avl.c b/module/avl/avl.c index e000647be..b598cc918 100644 --- a/module/avl/avl.c +++ b/module/avl/avl.c @@ -1040,6 +1040,7 @@ spl_module_exit(avl_fini); MODULE_DESCRIPTION("Generic AVL tree implementation"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); EXPORT_SYMBOL(avl_create); EXPORT_SYMBOL(avl_find); diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index 36f4e4dc1..7ba3084f4 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -3320,6 +3320,7 @@ spl_module_exit(nvpair_fini); 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); EXPORT_SYMBOL(nv_alloc_init); EXPORT_SYMBOL(nv_alloc_reset); diff --git a/module/unicode/u8_textprep.c b/module/unicode/u8_textprep.c index df6dcf552..9cd8a0060 100644 --- a/module/unicode/u8_textprep.c +++ b/module/unicode/u8_textprep.c @@ -2143,6 +2143,7 @@ spl_module_exit(unicode_fini); MODULE_DESCRIPTION("Unicode implementation"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); EXPORT_SYMBOL(u8_validate); EXPORT_SYMBOL(u8_strcmp); diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index abd547f10..98d5bea96 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -660,6 +660,7 @@ spl_module_exit(zcommon_fini); MODULE_DESCRIPTION("Generic ZFS support"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); /* zfs dataset property functions */ EXPORT_SYMBOL(zfs_userquota_prop_prefixes); diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 52b072a23..ae82cb45b 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -5836,4 +5836,5 @@ spl_module_exit(_fini); MODULE_DESCRIPTION("ZFS"); MODULE_AUTHOR(ZFS_META_AUTHOR); MODULE_LICENSE(ZFS_META_LICENSE); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE); #endif /* HAVE_SPL */ diff --git a/module/zpios/pios.c b/module/zpios/pios.c index be56b771d..3a0904140 100644 --- a/module/zpios/pios.c +++ b/module/zpios/pios.c @@ -1329,3 +1329,4 @@ spl_module_exit(zpios_fini); MODULE_AUTHOR("LLNL / Sun"); MODULE_DESCRIPTION("Kernel PIOS implementation"); MODULE_LICENSE("GPL"); +MODULE_VERSION(ZFS_META_VERSION "-" ZFS_META_RELEASE);