Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Aug 2013 22:09:46 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254105 - head/sys/boot/forth
Message-ID:  <201308082209.r78M9kvV077170@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Thu Aug  8 22:09:46 2013
New Revision: 254105
URL: http://svnweb.freebsd.org/changeset/base/254105

Log:
  Since the introduction of SVN r244048 and [follow-up] r244089, it is now
  safe to build upon ``boot_serial?'' functionality to make safer UI choices.

Modified:
  head/sys/boot/forth/beastie.4th
  head/sys/boot/forth/color.4th
  head/sys/boot/forth/color.4th.8
  head/sys/boot/forth/loader.conf.5
  head/sys/boot/forth/menu.4th
  head/sys/boot/forth/menu.4th.8
  head/sys/boot/forth/menu.rc
  head/sys/boot/forth/version.4th.8

Modified: head/sys/boot/forth/beastie.4th
==============================================================================
--- head/sys/boot/forth/beastie.4th	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/beastie.4th	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,6 +1,6 @@
 \ Copyright (c) 2003 Scott Long <scottl@freebsd.org>
 \ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com>
-\ Copyright (c) 2006-2011 Devin Teske <dteske@FreeBSD.org>
+\ Copyright (c) 2006-2013 Devin Teske <dteske@FreeBSD.org>
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -181,8 +181,8 @@ variable logoY
 \ 	beastie     Color ``Helper Daemon'' mascot (19 rows x 34 columns)
 \ 	beastiebw   B/W ``Helper Daemon'' mascot (19 rows x 34 columns)
 \ 	fbsdbw      "FreeBSD" logo in B/W (13 rows x 21 columns)
-\ 	orb         Color ``Orb'' mascot (15 rows x 30 columns)
-\ 	orbbw       B/W ``Orb'' mascot (15 rows x 32 columns) (default)
+\ 	orb         Color ``Orb'' mascot (15 rows x 30 columns) (default)
+\ 	orbbw       B/W ``Orb'' mascot (15 rows x 32 columns)
 \ 
 \ NOTE: Setting `loader_logo' to an undefined value (such as "none") will
 \       prevent beastie from being drawn.

Modified: head/sys/boot/forth/color.4th
==============================================================================
--- head/sys/boot/forth/color.4th	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/color.4th	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,4 +1,4 @@
-\ Copyright (c) 2011 Devin Teske <dteske@FreeBSD.org>
+\ Copyright (c) 2011-2013 Devin Teske <dteske@FreeBSD.org>
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -26,23 +26,24 @@
 
 marker task-color.4th
 
-\ This function returns TRUE if the `loader_color' environment variable is set
-\ to YES, yes, or 1. Otherwise, FALSE is returned.
+\ This function returns FALSE if the `loader_color' environment variable is set
+\ to NO, no, or 0. Otherwise, TRUE is returned (unless booting serial).
 \ 
 : loader_color? ( -- N )
 
 	s" loader_color" getenv dup -1 <> if
 
-		2dup s" YES" compare-insensitive 0= if
+		2dup s" NO" compare-insensitive 0= if
 			2drop
-			TRUE exit
+			FALSE exit
 		then
-		2dup s" 1" compare 0= if
+		2dup s" 0" compare 0= if
 			2drop
-			TRUE exit
+			FALSE exit
 		then
 		drop
 	then
+	drop
 
-	drop FALSE exit
+	boot_serial? if FALSE else TRUE then
 ;

Modified: head/sys/boot/forth/color.4th.8
==============================================================================
--- head/sys/boot/forth/color.4th.8	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/color.4th.8	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011 Devin Teske
+.\" Copyright (c) 2011-2013 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 18, 2011
+.Dd August 6, 2013
 .Dt COLOR.4TH 8
 .Os
 .Sh NAME
@@ -57,26 +57,26 @@ The commands provided by it are:
 .Pp
 .Bl -tag -width disable-module_module -compact -offset indent
 .It Ic loader_color?
-Returns TRUE if the
+Returns FALSE if the
 .Ic loader_color
 environment variable is set to
-.Dq YES
+.Dq NO
 (case-insensitive) or
-.Dq 1 .
-Otherwise returns FALSE.
+.Dq 0 .
+Otherwise returns TRUE
+.Pq unless booting serial .
 .El
 .Pp
 The environment variables that effect its behavior are:
 .Bl -tag -width bootfile -offset indent
 .It Va loader_color
 If set to
-.Dq YES
+.Dq NO
 (case-insensitive) or
-.Dq 1 ,
+.Dq 0 ,
 causes
 .Ic loader_color?
-to return TRUE, indicating to many other modules that color should be used
-whenever/wherever possible.
+to return FALSE, indicating to many modules that color should not be used.
 .El
 .Sh FILES
 .Bl -tag -width /boot/loader.4th -compact

Modified: head/sys/boot/forth/loader.conf.5
==============================================================================
--- head/sys/boot/forth/loader.conf.5	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/loader.conf.5	Thu Aug  8 22:09:46 2013	(r254105)
@@ -23,7 +23,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd December 10, 2012
+.Dd August 6, 2013
 .Dt LOADER.CONF 5
 .Os
 .Sh NAME
@@ -245,8 +245,8 @@ and
 .Dq Li none .
 .It Va loader_color
 If set to
-.Dq YES ,
-the beastie boot menu will be displayed using ANSI coloring where possible.
+.Dq NO ,
+the beastie boot menu will be displayed without ANSI coloring.
 .El
 .Sh FILES
 .Bl -tag -width /boot/defaults/loader.conf -compact

Modified: head/sys/boot/forth/menu.4th
==============================================================================
--- head/sys/boot/forth/menu.4th	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/menu.4th	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,6 +1,6 @@
 \ Copyright (c) 2003 Scott Long <scottl@freebsd.org>
 \ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com>
-\ Copyright (c) 2006-2012 Devin Teske <dteske@FreeBSD.org>
+\ Copyright (c) 2006-2013 Devin Teske <dteske@FreeBSD.org>
 \ All rights reserved.
 \ 
 \ Redistribution and use in source and binary forms, with or without
@@ -218,7 +218,7 @@ create init_text8 255 allot
 		\ NOTE: no need to check toggle_stateN since the first time we
 		\ are called, we will populate init_textN. Further, we don't
 		\ need to test whether menu_caption[x] (ansi_caption[x] when
-		\ loader_color=1) is available since we would not have been
+		\ loader_color?=1) is available since we would not have been
 		\ called if the caption was NULL.
 
 		\ base name of environment variable

Modified: head/sys/boot/forth/menu.4th.8
==============================================================================
--- head/sys/boot/forth/menu.4th.8	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/menu.4th.8	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011-2012 Devin Teske
+.\" Copyright (c) 2011-2013 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 25, 2012
+.Dd August 6, 2013
 .Dt MENU.4TH 8
 .Os
 .Sh NAME
@@ -83,13 +83,14 @@ The environment variables that effect it
 .Bl -tag -width bootfile -offset indent
 .It Va loader_color
 If set to
-.Dq Li YES
+.Dq Li NO
 (case-insensitive) or
-.Dq Li 1 ,
-causes the menu to be displayed in color wherever possible.
-This includes the
-use of ANSI bold for numbers appearing to the left of menuitems and the use of
-special
+.Dq Li 0 ,
+causes the menu to be displayed without color.
+The default is to use ANSI coloring whenever possible.
+If serial boot is enabled, color is disabled by default.
+Color features include the use of ANSI bold for numbers appearing to the left
+of menuitems and the use of special
 .Dq Li ansi
 variables described below.
 .It Va autoboot_delay
@@ -148,7 +149,9 @@ When pressed, will cause the execution o
 .It Va ansi_caption[x]
 If
 .Va loader_color
-is set, use this caption for menuitem
+is set
+.Pq enabled by default ,
+use this caption for menuitem
 .Dq Li x
 instead of
 .Va menu_caption[x] .
@@ -165,7 +168,8 @@ Like
 .Va toggled_text[x]
 except used when
 .Va loader_color
-is enabled.
+is enabled
+.Pq default .
 .It Va menu_caption[x][y]
 For menuitems where
 .Va menu_command[x]
@@ -179,7 +183,8 @@ Like
 .Va menu_caption[x][y]
 except used when
 .Va loader_color
-is enabled.
+is enabled
+.Pq default .
 .It Va menu_acpi
 When set to a number
 .Dq Li x

Modified: head/sys/boot/forth/menu.rc
==============================================================================
--- head/sys/boot/forth/menu.rc	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/menu.rc	Thu Aug  8 22:09:46 2013	(r254105)
@@ -16,7 +16,7 @@ draw-brand    \ draw the FreeBSD title (
 menu-init     \ initialize the menu area (see `menu.4th')
 
 \ Initialize main menu constructs (see `menu.4th')
-\ NOTE: To use the `ansi' variants, add `loader_color=1' to loader.conf(5)
+\ NOTE: To use `non-ansi' variants, add `loader_color=0' to loader.conf(5)
 
 \ 
 \ MAIN MENU

Modified: head/sys/boot/forth/version.4th.8
==============================================================================
--- head/sys/boot/forth/version.4th.8	Thu Aug  8 22:07:59 2013	(r254104)
+++ head/sys/boot/forth/version.4th.8	Thu Aug  8 22:09:46 2013	(r254105)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2011 Devin Teske
+.\" Copyright (c) 2011-2013 Devin Teske
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 19, 2011
+.Dd August 6, 2013
 .Dt VERSION.4TH 8
 .Os
 .Sh NAME
@@ -84,10 +84,11 @@ Sets the desired ending row position of
 Default is 24.
 .It Va loader_color
 If set to
-.Dq Li YES
+.Dq Li NO
 (case-insensitive) or
-.Dq Li 1 ,
-causes the version to be printed in ANSI Cyan.
+.Dq Li 0 ,
+causes the version to be printed without color
+.Pq default is ANSI Cyan .
 .El
 .Sh FILES
 .Bl -tag -width /boot/loader.4th -compact
@@ -113,6 +114,7 @@ loader_version="loader 1.1"
 .Sh SEE ALSO
 .Xr loader.conf 5 ,
 .Xr loader 8 ,
+.Xr color.4th 8
 .Sh HISTORY
 The
 .Nm



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308082209.r78M9kvV077170>