Author: imp
Date: Fri Feb  9 00:36:55 2018
New Revision: 329054
URL: https://svnweb.freebsd.org/changeset/base/329054

Log:
  Set script.lang in the environment to either 'forth' or 'simple' to
  reflect what scripting language was compiled into the loader. I
  anticipate that being able to find this out quickly from the OK prompt
  will be useful in troubleshooting in the future.

Modified:
  head/stand/common/interp_forth.c
  head/stand/common/interp_simple.c

Modified: head/stand/common/interp_forth.c
==============================================================================
--- head/stand/common/interp_forth.c    Fri Feb  9 00:13:05 2018        
(r329053)
+++ head/stand/common/interp_forth.c    Fri Feb  9 00:36:55 2018        
(r329054)
@@ -337,6 +337,7 @@ void
 interp_init(void)
 {
 
+       setenv("script.lang", "forth", 1);
        bf_init();
        /* Read our default configuration. */
        interp_include("/boot/loader.rc");

Modified: head/stand/common/interp_simple.c
==============================================================================
--- head/stand/common/interp_simple.c   Fri Feb  9 00:13:05 2018        
(r329053)
+++ head/stand/common/interp_simple.c   Fri Feb  9 00:36:55 2018        
(r329054)
@@ -39,6 +39,7 @@ void
 interp_init(void)
 {
 
+       setenv("script.lang", "simple", 1);
        /* Read our default configuration. */
        interp_include("/boot/loader.rc");
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to