aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/forth
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2004-12-01 07:17:57 +0000
committerScott Long <scottl@FreeBSD.org>2004-12-01 07:17:57 +0000
commite522e6e98834cae55cb5434ca1744e3e7d72b84c (patch)
treec9085a1853a40b6d3ea1252452b106fdde85d27c /sys/boot/forth
parentcd1512508475c5b48e037ffb54fd9339a9cecbec (diff)
downloadsrc-e522e6e98834cae55cb5434ca1744e3e7d72b84c.tar.gz
src-e522e6e98834cae55cb5434ca1744e3e7d72b84c.zip
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.
Notes
Notes: svn path=/head/; revision=138258
Diffstat (limited to 'sys/boot/forth')
-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 824d2df63344..5f8f71a99876 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