Author: tsoome Date: Thu Sep 26 07:19:26 2019 New Revision: 352740 URL: https://svnweb.freebsd.org/changeset/base/352740
Log: kernel terminal should initialize fg and bg variables before calling TUNABLE_INT_FETCH We have two ways to check if kenv variable exists - either we check return value from TUNABLE_INT_FETCH, or we pre-initialize the variable and check if this value did change. In terminal_init() it is more convinient to use pre-initialized variables. Problem was revealed by older loader.efi, which did not set teken.* variables. Reported by: tuexen Modified: head/sys/kern/subr_terminal.c Modified: head/sys/kern/subr_terminal.c ============================================================================== --- head/sys/kern/subr_terminal.c Thu Sep 26 07:14:54 2019 (r352739) +++ head/sys/kern/subr_terminal.c Thu Sep 26 07:19:26 2019 (r352740) @@ -175,6 +175,7 @@ terminal_init(struct terminal *tm) teken_init(&tm->tm_emulator, &terminal_drawmethods, tm); + fg = bg = -1; TUNABLE_INT_FETCH("teken.fg_color", &fg); TUNABLE_INT_FETCH("teken.bg_color", &bg); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"