summaryrefslogtreecommitdiffstats
path: root/sys/boot/forth/loader.4th
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>2000-09-16 19:49:52 +0000
committerdcs <dcs@FreeBSD.org>2000-09-16 19:49:52 +0000
commit38f4e30e699cf5210b03c2405d7aa4d1b6c12a6b (patch)
tree6d0b97bdcada35be9d133ac955068d6182c09898 /sys/boot/forth/loader.4th
parent27fb7bdf0982016140b450f1ed43807dbe20cfab (diff)
downloadFreeBSD-src-38f4e30e699cf5210b03c2405d7aa4d1b6c12a6b.zip
FreeBSD-src-38f4e30e699cf5210b03c2405d7aa4d1b6c12a6b.tar.gz
Both boot and boot-conf were using a different algorithm from the one
used by start to find the kernel. Fix this. Also, boot would proceed immediately in the absence of a path as argument. Check first if a kernel has already been loaded, and, if not, fall back to load kernel&modules behavior. Some further factorizing. I deem this code to be mostly readable by now! :-) Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
Diffstat (limited to 'sys/boot/forth/loader.4th')
-rw-r--r--sys/boot/forth/loader.4th12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th
index a125e70..69a1614 100644
--- a/sys/boot/forth/loader.4th
+++ b/sys/boot/forth/loader.4th
@@ -65,19 +65,27 @@ only forth also support-functions also builtins definitions
c@ [char] - <> if
0 1 unload drop
else
+ s" kernelname" getenv? 0= if ( no kernel has been loaded )
+ load_conf
+ ?dup if exit then
+ then
1 boot exit
then
else
+ s" kernelname" getenv? 0= if ( no kernel has been loaded )
+ load_conf
+ ?dup if exit then
+ then
1 boot exit
then
- load-conf
+ load_conf
?dup 0= if 0 1 boot then
;
: boot-conf
0= if ( interpreted ) get-arguments then
0 1 unload drop
- load-conf
+ load_conf
?dup 0= if 0 1 autoboot then
;
OpenPOWER on IntegriCloud