mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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
This commit is contained in:
committed by
Tony Hutter
parent
fc2c0256c5
commit
3d9f37026d
@@ -163,6 +163,7 @@ int zfs_ioctl_fd(int fd, unsigned long request, struct zfs_cmd *zc);
|
||||
#define ANSI_RESET "\033[0m"
|
||||
#define ANSI_BOLD "\033[1m"
|
||||
|
||||
int use_color(void);
|
||||
void color_start(const char *color);
|
||||
void color_end(void);
|
||||
int printf_color(const char *color, char *format, ...);
|
||||
|
||||
Reference in New Issue
Block a user