]> git.proxmox.com Git - mirror_zfs.git/commit
Fix "Add colored output to zfs list"
authorTino Reichardt <milky-zfs@mcmilk.de>
Wed, 5 Apr 2023 16:57:01 +0000 (18:57 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2023 16:57:01 +0000 (09:57 -0700)
commit6ecdd35bdbcdeae0adabefe107677620e88d5548
treeabbbed21514d59fd02e69ae130496cb2cceba5ed
parent3399a30ee02d0d31ba2d43d0ce0a2fd90d5c575d
Fix "Add colored output to zfs list"

Running `zfs list -o avail rpool` resulted in a core dump.
This commit will fix this.

Run the needed overhead only, when `use_color()` is true.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Wilson <gwilson@delphix.com>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14712
cmd/zfs/zfs_main.c
include/libzutil.h
lib/libzfs/libzfs.abi
lib/libzfs/libzfs_util.c