From 9aa2d72c0b7ffd836b0f633a523c698cfa854256 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Wed, 24 Jan 2018 16:18:00 +0200 Subject: [PATCH] 8986 loader: try_multiple_kernels does not try multiple kernels Reviewed by: Yuri Pankov Reviewed by: Rich Lowe Approved by: Dan McDonald --- usr/src/boot/sys/boot/forth/support.4th | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/usr/src/boot/sys/boot/forth/support.4th b/usr/src/boot/sys/boot/forth/support.4th index 8b30502724..b95068f745 100644 --- a/usr/src/boot/sys/boot/forth/support.4th +++ b/usr/src/boot/sys/boot/forth/support.4th @@ -1553,17 +1553,6 @@ also builtins \ Parse filename from a semicolon-separated list -\ replacement, not working yet -: newparse-; { addr len | a1 -- a' len-x addr x } - addr len [char] ; strchr dup if ( a1 len1 ) - swap to a1 ( store address ) - 1 - a1 @ 1 + swap ( remove match ) - addr a1 addr - - else - 0 0 addr len - then -; - : parse-; ( addr len -- addr' len-x addr x ) over 0 2swap ( addr 0 addr len ) begin @@ -1594,11 +1583,19 @@ also builtins dup 2 = if ." Flags : " >r 2over type r> cr then then \ if it's xen, the xen kernel is loaded, unix needs to be loaded as module - s" xen_kernel" getenv -1 = if - 1 load \ normal kernel - else - drop - >r s" kernel" s" -t " r> 2 + 1 load + s" xen_kernel" getenv -1 <> if + drop \ drop address from getenv + >r \ argument count to R + s" kernel" s" -t " \ push 2 strings into the stack + r> 2 + \ increment argument count + then + + 1 ['] load catch dup if + ( addr0 len0 addr1 len1 ... args 1 error ) + >r \ error code to R + drop \ drop 1 + 0 do 2drop loop \ drop addr len pairs + r> \ set flag for while then while dup 0= -- 2.11.4.GIT