summaryrefslogtreecommitdiffstats
path: root/term-utils
diff options
context:
space:
mode:
authorJakub Wilk2019-03-07 21:55:07 +0100
committerJakub Wilk2019-03-07 22:11:46 +0100
commit3d886e86f62d190a65023ab1be921ac592225018 (patch)
tree668aec790e4274a6f4ba921ea21416722afa7762 /term-utils
parentsetterm: disallow "default" for --ulcolor/--hbcolor (diff)
downloadkernel-qcow2-util-linux-3d886e86f62d190a65023ab1be921ac592225018.tar.gz
kernel-qcow2-util-linux-3d886e86f62d190a65023ab1be921ac592225018.tar.xz
kernel-qcow2-util-linux-3d886e86f62d190a65023ab1be921ac592225018.zip
setterm: fix bright colors for --ulcolor/--hbcolor
The "bright" keyword was parsed, but it didn't actually affect the color that was set. Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Diffstat (limited to 'term-utils')
-rw-r--r--term-utils/setterm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/term-utils/setterm.c b/term-utils/setterm.c
index a8ccc3864..4c29a462e 100644
--- a/term-utils/setterm.c
+++ b/term-utils/setterm.c
@@ -236,6 +236,9 @@ static int parse_ulhb_color(char **av, int *oi)
if (bright && (color == BLACK || color == GREY))
errx(EXIT_FAILURE, _("argument error: bright %s is not supported"), color_name);
+ if (bright)
+ color |= 8;
+
return color;
}