Page MenuHomeFreeBSD

stand: add a mechanism to avoid env var propagation to kenv
Needs ReviewPublic

Authored by kevans on Mon, Jun 16, 10:36 PM.
Tags
None
Referenced Files
F122005872: D50888.id157144.diff
Tue, Jul 1, 9:37 AM
F121925713: D50888.diff
Mon, Jun 30, 5:23 PM
Unknown Object (File)
Sun, Jun 29, 11:39 PM
Unknown Object (File)
Fri, Jun 27, 8:52 PM
Unknown Object (File)
Tue, Jun 24, 6:04 PM
Unknown Object (File)
Tue, Jun 24, 5:40 PM
Unknown Object (File)
Tue, Jun 24, 5:36 AM
Unknown Object (File)
Sat, Jun 21, 7:03 PM
Subscribers

Details

Reviewers
imp
tsoome
manu
Group Reviewers
Loader
Summary

Our only user of this at the moment is teken.{fg,bg}_color. These are
special because teken is a library common to both the kernel and the loader,
and we want to avoid having special vars to control the loader vs. the
kernel. Ideally, if a user wants a different set of console colors, then
they set the appropriate teken variable and it Just Works(TM) everywher.
We can't just avoid setting the env vars, because we specifically want to
install a hook to adjust how loader is drawn.

This allows us to avoid breaking a kernel config(5) that has some default
teken colors set with our defaults. That's a valid configuration, even if
it might seem weird that they don't want to set colors in both loader and
the kernel -- they may not anticipate spending any time in loader, and thus
prefer to just let it do its default behavior.

NOKENV is expected to be unset if the value is overwritten, rather than
acting as a persistent marker that we do not want the value to persist under
any circumstance. We can always add another flag bit later for persistence
if we find a use for that, but most variables are fine to carry over. This
is mostly needed for environment variables that we really just want to set
a hook for.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64922
Build 61805: arc lint + arc unit