summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/tem.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/io/tem.c')
-rw-r--r--usr/src/uts/common/io/tem.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/tem.c b/usr/src/uts/common/io/tem.c
index b91952fc32..417a989f63 100644
--- a/usr/src/uts/common/io/tem.c
+++ b/usr/src/uts/common/io/tem.c
@@ -964,16 +964,20 @@ tems_get_initial_color(tem_color_t *pcolor)
{
boolean_t inverse, inverse_screen;
unsigned short flags = 0;
+ uint8_t fg, bg;
- pcolor->fg_color = DEFAULT_ANSI_FOREGROUND;
- pcolor->bg_color = DEFAULT_ANSI_BACKGROUND;
+ fg = DEFAULT_ANSI_FOREGROUND;
+ bg = DEFAULT_ANSI_BACKGROUND;
#ifndef _HAVE_TEM_FIRMWARE
/*
* _HAVE_TEM_FIRMWARE is defined on SPARC, at this time, the
* plat_tem_get_colors() is implemented only on x86.
*/
- plat_tem_get_colors(&pcolor->fg_color, &pcolor->bg_color);
+
+ plat_tem_get_colors(&fg, &bg);
#endif
+ pcolor->fg_color.n = fg;
+ pcolor->bg_color.n = bg;
tems_get_inverses(&inverse, &inverse_screen);
if (inverse)
@@ -1001,16 +1005,16 @@ tems_get_initial_color(tem_color_t *pcolor)
}
#else
if (flags != 0) {
- if (pcolor->fg_color == ANSI_COLOR_WHITE)
+ if (pcolor->fg_color.n == ANSI_COLOR_WHITE)
flags |= TEM_ATTR_BRIGHT_BG;
- if (pcolor->fg_color == ANSI_COLOR_BLACK)
+ if (pcolor->fg_color.n == ANSI_COLOR_BLACK)
flags &= ~TEM_ATTR_BRIGHT_BG;
} else {
/*
* In case of black on white we want bright white for BG.
*/
- if (pcolor->bg_color == ANSI_COLOR_WHITE)
+ if (pcolor->bg_color.n == ANSI_COLOR_WHITE)
flags |= TEM_ATTR_BRIGHT_BG;
}
#endif