]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/zpool/zpool_main.c
Make zpool list -vp print individual vdev sizes parsable.
authorChrister Ekholm <che@chrekh.se>
Mon, 16 May 2016 19:29:54 +0000 (21:29 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 18 May 2016 17:15:32 +0000 (10:15 -0700)
commitbc2d809387debb95d82f47185d446f328da4d147
treebe6f6191a86a569e2044c1cf40cef7732324b3e7
parent81b4c075eca2c4c4129933a012cd354f75201f69
Make zpool list -vp print individual vdev sizes parsable.

Add argument format to print_one_column(), and use it to call
zfs_nicenum_format with, instead of just zfs_nicenum. Don't print "%"
for fragmentation or capacity percent values.

The calls to print_one_colum is made with ZFS_NICENUM_RAW if
cb->cb_literal (zpool list called with -p), and ZFS_NICENUM_1024 if not.

Also zpool_get_prop is modified to don't add "%" or "x" if literal.

Signed-off-by: Christer Ekholm <che@chrekh.se>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov
Closes #4657
cmd/zpool/zpool_main.c
lib/libzfs/libzfs_pool.c