[SLOF] [PATCH v4 1/2] boot: do not concatenate bootdev

Alexey Kardashevskiy aik at ozlabs.ru
Wed Dec 13 13:09:37 AEDT 2017


On 12/12/17 16:37, Nikunj A Dadhania wrote:
> We were concatenating the word " parse-load" and $bootdev list that was input to
> evaluate. Open code EVALUATE work such that concatenation is not required.
> "load" and "load-next" does not use $cat anymore.
> 
> Reported here: https://github.com/qemu/SLOF/issues/3
> 
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>



Thanks, applied.



> ---
>  slof/fs/boot.fs | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/slof/fs/boot.fs b/slof/fs/boot.fs
> index 1fd7439..5d41a0e 100644
> --- a/slof/fs/boot.fs
> +++ b/slof/fs/boot.fs
> @@ -221,11 +221,19 @@ defer go ( -- )
>     ELSE
>        drop
>     THEN
> -   set-boot-args s" parse-load " $bootdev $cat strdup evaluate
> +   set-boot-args
> +   save-source  -1 to source-id
> +   $bootdev dup #ib ! span ! to ib
> +   0 >in !
> +   ['] parse-load catch restore-source throw
>  ;
>  
>  : load-next ( -- success )	\ Continue after go failed
> -   load-list 2@ ?dup IF s" parse-load " 2swap $cat strdup evaluate
> +   load-list 2@ ?dup IF
> +      save-source  -1 to source-id
> +      dup #ib ! span ! to ib
> +      0 >in !
> +      ['] parse-load catch restore-source throw
>     ELSE drop false THEN
>  ;
>  
> 


-- 
Alexey


More information about the SLOF mailing list