HomeFreeBSD

Introduce zpool_get_prop_literal interface

Description

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

Details

Provenance
Ralf Ertzinger <ralf@skytale.net>Authored on Oct 23 2013, 8:33 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 28 2013, 9:27 PM
Parents
rG157c9b6981ab: Corrected "zfs list -t <type>" syntax
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG8b921f667afc: Introduce zpool_get_prop_literal interface (authored by Ralf Ertzinger <ralf@skytale.net>).Oct 28 2013, 9:27 PM