[SLOF] [PATCH v4 1/2] boot: do not concatenate bootdev
Segher Boessenkool
segher at kernel.crashing.org
Wed Dec 13 04:22:49 AEDT 2017
On Tue, Dec 12, 2017 at 11:07:12AM +0530, 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>
> ---
> 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
> ;
This looks fine to me.
Segher
More information about the SLOF
mailing list