summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-12-01 07:17:57 +0000
committerscottl <scottl@FreeBSD.org>2004-12-01 07:17:57 +0000
commit4392c73e67a23500e5151546931e96d2a369f536 (patch)
treec9085a1853a40b6d3ea1252452b106fdde85d27c /sys/boot
parent36019877652c79fb03325c5c3033e24a7f02da6f (diff)
downloadFreeBSD-src-4392c73e67a23500e5151546931e96d2a369f536.zip
FreeBSD-src-4392c73e67a23500e5151546931e96d2a369f536.tar.gz
Fix a bunch of stack leaks. These were theoretically harmless, except that
they would leave enough elements on the stack that if you escaped to the loader prompt and then typed 'setenv', it would pull in all of the leaked junk and cause an exception in the environment. There still seems to be 3 leaked elements, but they don't appear to be coming from this file.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/forth/beastie.4th16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/boot/forth/beastie.4th b/sys/boot/forth/beastie.4th
index 824d2df..5f8f71a 100644
--- a/sys/boot/forth/beastie.4th
+++ b/sys/boot/forth/beastie.4th
@@ -69,7 +69,7 @@ variable rebootkey
2dup at-xy ." \ / /\" 1+
2dup at-xy ." ______( (_ / \______/" 1+
2dup at-xy ." ,' ,-----' |" 1+
-at-xy ." `--{__________) " 1+
+at-xy ." `--{__________) "
;
: boring-beastie ( x y -- )
@@ -121,6 +121,8 @@ at-xy ." `--{__________) " 1+
s" 0" compare 0<> if
false exit
then
+ else
+ drop
then
true
;
@@ -147,6 +149,7 @@ at-xy ." `--{__________) " 1+
13 6 at-xy ." Welcome to FreeBSD!"
printmenuitem ." Boot FreeBSD [default]" bootkey !
s" arch-i386" environment? if
+ drop
printmenuitem ." Boot FreeBSD with ACPI " bootacpikey !
acpienabled? if
." disabled"
@@ -161,9 +164,10 @@ at-xy ." `--{__________) " 1+
printmenuitem ." Boot FreeBSD with verbose logging" bootverbosekey !
printmenuitem ." Escape to loader prompt" escapekey !
s" arch-i386" environment? if
+ drop
printmenuitem ." Boot FreeBSD with USB keyboard" bootusbkey !
else
- -2 bootacpikey !
+ -2 bootusbkey !
then
printmenuitem ." Reboot" rebootkey !
menuX @ 20 at-xy
@@ -174,7 +178,6 @@ at-xy ." `--{__________) " 1+
;
: tkey
- dup
seconds +
begin 1 while
over 0<> if
@@ -202,6 +205,8 @@ set-current
s" YES" compare-insensitive 0= if
exit
then
+ else
+ drop
then
beastie-menu
s" autoboot_delay" getenv
@@ -211,7 +216,7 @@ set-current
else
0 0 2swap >number drop drop drop
then
- begin true while
+ begin
dup tkey
0 25 at-xy
dup 32 = if nip 0 swap then
@@ -235,6 +240,7 @@ set-current
then
dup bootsafekey @ = if
s" arch-i386" environment? if
+ drop
s" acpi_load" unsetenv
s" 1" s" hint.acpi.0.disabled" setenv
s" 1" s" loader.acpi_disabled_by_user" setenv
@@ -260,7 +266,7 @@ set-current
exit
then
rebootkey @ = if 0 reboot then
- repeat
+ again
;
previous
OpenPOWER on IntegriCloud