summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRalf Ertzinger <[email protected]>2013-10-23 10:33:33 +0200
committerBrian Behlendorf <[email protected]>2013-10-28 14:27:53 -0700
commit8b921f667afc86c452242be0b6d3b257472ebe76 (patch)
tree2bc38d49cf80adc483f6e1d3a3b7511e653111de /include
parent157c9b6981ab6203550e8857144ac49e1e867fb7 (diff)
Introduce zpool_get_prop_literal interface
This change introduces zpool_get_prop_literal. It's an expanded version of zpool_get_prop taking one additional boolean parameter. With this parameter set to B_FALSE it will behave identically to zpool_get_prop. Setting it to B_TRUE will return full precision numbers for the following properties: ZPOOL_PROP_SIZE ZPOOL_PROP_ALLOCATED ZPOOL_PROP_FREE ZPOOL_PROP_FREEING ZPOOL_PROP_EXPANDSZ ZPOOL_PROP_ASHIFT Also introduced is a wrapper function for zpool_get_prop making it use zpool_get_prop_literal in the background. Signed-off-by: Brian Behlendorf <[email protected]> Issue #1813
Diffstat (limited to 'include')
-rw-r--r--include/libzfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index 273286ceb..c212a0c05 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -281,6 +281,8 @@ extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, char *);
extern int zpool_set_prop(zpool_handle_t *, const char *, const char *);
extern int zpool_get_prop(zpool_handle_t *, zpool_prop_t, char *,
size_t proplen, zprop_source_t *);
+extern int zpool_get_prop_literal(zpool_handle_t *, zpool_prop_t, char *,
+ size_t proplen, zprop_source_t *, boolean_t literal);
extern uint64_t zpool_get_prop_int(zpool_handle_t *, zpool_prop_t,
zprop_source_t *);