]> granicus.if.org Git - zfs/commit - lib/libzfs/libzfs_pool.c
Introduce zpool_get_prop_literal interface
authorRalf Ertzinger <ralf@skytale.net>
Wed, 23 Oct 2013 08:33:33 +0000 (10:33 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 28 Oct 2013 21:27:53 +0000 (14:27 -0700)
commit8b921f667afc86c452242be0b6d3b257472ebe76
tree2bc38d49cf80adc483f6e1d3a3b7511e653111de
parent157c9b6981ab6203550e8857144ac49e1e867fb7
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 <behlendorf1@llnl.gov>
Issue #1813
include/libzfs.h
lib/libzfs/libzfs_pool.c