aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzfs.h
diff options
context:
space:
mode:
authorTerraTech <[email protected]>2019-04-10 00:43:28 -0700
committerBrian Behlendorf <[email protected]>2019-04-16 12:24:06 -0700
commit50478c6dadc2accfab5bfe72d278ede17c2e13cf (patch)
treedb8bacb6f2193e7c20b311780f7516549b24f798 /include/libzfs.h
parent8750edf1f75e4f02c353be490309940f11115f23 (diff)
Add option [-V|--version] to emit version string
Add the 'zfs version' and 'zpool version' subcommands to display the version of the user space utilities and loaded zfs kernel module. For example: $ zfs version zfs-0.8.0-rc3_169_g67e0366b88 zfs-kmod-0.8.0-rc3_169_g67e0366b88 The '-V' and '--version' aliases were added to support the common convention of using 'zfs --version` to obtain the version information. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Richard Laager <[email protected]> Signed-off-by: TerraTech <[email protected]> Closes #2501 Closes #8567
Diffstat (limited to 'include/libzfs.h')
-rw-r--r--include/libzfs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index b604f1194..8d79fe69e 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -816,6 +816,13 @@ void libzfs_free_str_array(char **strs, int count);
int libzfs_envvar_is_set(char *envvar);
/*
+ * Utility functions for zfs version
+ */
+extern void zfs_version_userland(char *, int);
+extern int zfs_version_kernel(char *, int);
+extern int zfs_version_print(void);
+
+/*
* Given a device or file, determine if it is part of a pool.
*/
extern int zpool_in_use(libzfs_handle_t *, int, pool_state_t *, char **,