HomeFreeBSD

Add zfs_nicebytes() to print human-readable sizes

Description

Add zfs_nicebytes() to print human-readable sizes

  • Add zfs_nicebytes() to print human-readable sizes

Some 'zfs', 'zpool' and 'zdb' output strings can be confusing to the
user when no units are specified. This add a new zfs_nicenum_format
"ZFS_NICENUM_BYTES" used to print bytes in their human-readable form.

Additionally, update some test cases to use machine-parsable 'zfs get'.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #2414
Closes #3185
Closes #3594
Closes #6032

Details

Provenance
LOLi <loli10K@users.noreply.github.com>Authored on May 2 2017, 8:43 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 2 2017, 8:43 PM
Parents
rG03b60eee78b0: Allow scaling of arc in proportion to pagecache
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGe7fbeb606a18: Add zfs_nicebytes() to print human-readable sizes (authored by LOLi <loli10K@users.noreply.github.com>).May 2 2017, 8:43 PM