Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137923204
D21732.id62356.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21732.id62356.diff
View Options
Index: stand/forth/color.4th
===================================================================
--- stand/forth/color.4th
+++ stand/forth/color.4th
@@ -27,12 +27,14 @@
marker task-color.4th
\ This function returns FALSE if the `loader_color' environment variable is set
-\ to NO, no, or 0. Otherwise, TRUE is returned (unless booting serial).
+\ to NO, no, or 0. It returns TRUE if `loader_color' is set to any other value.
+\ If `loader_color' is unset, TRUE is returned (unless booting serial).
\
: loader_color? ( -- N )
s" loader_color" getenv dup -1 <> if
-
+ \ `loader_color' is set.
+ \ Check if it is explicitly disabled.
2dup s" NO" compare-insensitive 0= if
2drop
FALSE exit
@@ -42,8 +44,12 @@
FALSE exit
then
drop
+ \ It is enabled.
+ TRUE
+ else
+ \ `loader_color' is unset.
+ \ Default to using color unless serial boot is active.
+ drop
+ boot_serial? if FALSE else TRUE then
then
- drop
-
- boot_serial? if FALSE else TRUE then
;
Index: stand/lua/color.lua
===================================================================
--- stand/lua/color.lua
+++ stand/lua/color.lua
@@ -49,9 +49,7 @@
function color.isEnabled()
local c = loader.getenv("loader_color")
if c ~= nil then
- if c:lower() == "no" or c == "0" then
- return false
- end
+ return c:lower() ~= "no" and c ~= "0"
end
return not core.isSerialBoot()
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 7:17 AM (3 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26277080
Default Alt Text
D21732.id62356.diff (1 KB)
Attached To
Mode
D21732: loader: Respect loader_color=YES for serial consoles
Attached
Detach File
Event Timeline
Log In to Comment