From e30cf9b7680d13fc0795c37e2487108dadd09f8e Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 19 Apr 2022 16:28:47 +0200 Subject: [PATCH 305/310] stand: Do not force default values into the environment .. if the user does not specify teken.fg_color or teken.bg_color, allowing the kernel defaults to take effect. Patch by emaste@ taken from: https://reviews.freebsd.org/D34509 See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261311 Obtained from: ElectroBSD --- stand/efi/libefi/efi_console.c | 9 --------- stand/i386/libi386/vidconsole.c | 7 ------- 2 files changed, 16 deletions(-) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 1aeb94344c58..6b3528c206fd 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -1056,15 +1056,6 @@ cons_update_mode(bool use_gfx_mode) 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, - efi_set_colors, env_nounset); - snprintf(env, sizeof(env), "%d", - attr.ta_bgcolor); - env_setenv("teken.bg_color", EV_VOLATILE, env, - efi_set_colors, env_nounset); } } } diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index 1ec6b4f5393a..e0656b86a65d 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -972,13 +972,6 @@ cons_update_mode(bool use_gfx_mode) 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); } /* Improve visibility */ -- 2.37.1