aboutsummaryrefslogtreecommitdiff
path: root/stand/i386/libi386/vidconsole.c
diff options
context:
space:
mode:
Diffstat (limited to 'stand/i386/libi386/vidconsole.c')
-rw-r--r--stand/i386/libi386/vidconsole.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c
index 414803e9af3d..3938bd7822ea 100644
--- a/stand/i386/libi386/vidconsole.c
+++ b/stand/i386/libi386/vidconsole.c
@@ -956,26 +956,7 @@ cons_update_mode(bool use_gfx_mode)
a = teken_get_defattr(&gfx_state.tg_teken);
attr = *a;
- /*
- * On first run, we set up the vidc_set_colors()
- * callback. If the env is already set, we
- * pick up fg and bg color values from the environment.
- */
- ptr = getenv("teken.fg_color");
- if (ptr != NULL) {
- attr.ta_fgcolor = strtol(ptr, NULL, 10);
- ptr = getenv("teken.bg_color");
- attr.ta_bgcolor = strtol(ptr, NULL, 10);
-
- teken_set_defattr(&gfx_state.tg_teken, &attr);
- } else {
- snprintf(env, sizeof(env), "%d", attr.ta_fgcolor);
- env_setenv("teken.fg_color", EV_VOLATILE, env,
- vidc_set_colors, env_nounset);
- snprintf(env, sizeof(env), "%d", attr.ta_bgcolor);
- env_setenv("teken.bg_color", EV_VOLATILE, env,
- vidc_set_colors, env_nounset);
- }
+ gfx_fb_setcolors(&attr, vidc_set_colors, env_nounset);
/* Improve visibility */
if (attr.ta_bgcolor == TC_WHITE)