svn commit: r266938 - head/sys/boot/forth

Craig Rodrigues rodrigc at FreeBSD.org
Sun Jun 1 04:08:46 UTC 2014


Author: rodrigc
Date: Sun Jun  1 04:08:45 2014
New Revision: 266938
URL: http://svnweb.freebsd.org/changeset/base/266938

Log:
  Allow customization of the brand displayed in the boot menu.
  If the user specifies in /boot/loader.conf:
  
      loader_brand="mycustom-brand"
  
  Then "mycustom-brand" will be executed instead of "fbsd-logo".
  
  Submitted by:    alfred
  Obtained from:   FreeNAS

Modified:
  head/sys/boot/forth/brand.4th

Modified: head/sys/boot/forth/brand.4th
==============================================================================
--- head/sys/boot/forth/brand.4th	Sun Jun  1 03:57:57 2014	(r266937)
+++ head/sys/boot/forth/brand.4th	Sun Jun  1 04:08:45 2014	(r266938)
@@ -56,6 +56,8 @@ variable brandY
 \ 	NAME        DESCRIPTION
 \ 	fbsd        FreeBSD logo
 \ 
+\ NOTE: Setting `loader_brand' to the value of an existing function
+\       (such as "mycustom-brand") will cause that symbol to be executed.
 \ NOTE: Setting `loader_brand' to an undefined value (such as "none") will
 \       prevent any brand from being drawn.
 \ 
@@ -87,5 +89,14 @@ variable brandY
 		2drop exit
 	then
 
+        \ if it refers to a raw symbol then run that function
+        sfind if
+            brandX @ brandY @
+            2 roll
+            execute
+        else            
+            drop
+        then
+
 	2drop
 ;


More information about the svn-src-head mailing list