Introduce zpool_get_prop_literal interface
authorRalf Ertzinger <ralf@skytale.net>
Wed, 23 Oct 2013 08:33:33 +0000 (10:33 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Wed, 23 Oct 2013 08:33:33 +0000 (10:33 +0200)
commita36bf1149d7408fde273851350c0ef6c0e4fe989
tree7c2891cf4bb82a47f8d7a04e4f72369a600f9583
parent0c28fb480836ab7bb1bbf8de6e572d2443273396
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.
include/libzfs.h
lib/libzfs/libzfs_pool.c