]> git.proxmox.com Git - mirror_zfs.git/commit - tests/runfiles/common.run
Colorize zpool status output
authorTony Hutter <hutter2@llnl.gov>
Fri, 20 Dec 2019 00:26:07 +0000 (16:26 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 20 Dec 2019 00:26:07 +0000 (16:26 -0800)
commit9fb2771aa5f53a14f8c30dca6b9f609d192e50f6
treebe45f618051ea8a88ae5797fc011af775b002ee7
parent5e8ac0559046e8432bc7ae3232e4d4d746b09a4d
Colorize zpool status output

If the ZFS_COLOR env variable is set, then use ANSI color
output in zpool status:

- Column headers are bold
- Degraded or offline pools/vdevs are yellow
- Non-zero error counters and faulted vdevs/pools are red
- The 'status:' and 'action:' sections are yellow if they're
  displaying a warning.

This also includes a new 'faketty' function in libtest.shlib that is
compatible with FreeBSD (code provided by @freqlabs).

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #9340
cmd/zpool/zpool_main.c
include/libzutil.h
lib/libzfs/libzfs_util.c
man/man8/zpool.8
tests/runfiles/common.run
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/zpool/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool/zpool_colors.ksh [new file with mode: 0755]