monitor: Add option to force output color
authorSonny Sasaka <sonnysasaka@chromium.org>
Tue, 16 Mar 2021 22:16:48 +0000 (15:16 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commitc5d39e0c2d15547c02a9582d517fa5d9c1952a6a
tree7f73cb2b985d50f23f91a0f4e867630f8b69fb0e
parentc88e27ffd0e2a909e2cdc0fe41f5739ba585b701
monitor: Add option to force output color

Sometimes we want to force output color even when stdout is not a
terminal, for example when piping the output to a filter script and then
piping it further to a pager which can display colors.

This patch provides a general option to force whether color is on or off
(always and never), or leave btmon to decide (auto).

Reviewed-by: Daniel Winkler <danielwinkler@google.com>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/display.c
monitor/display.h
monitor/main.c