Message ID | 20171212053713.13495-1-nikunj@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Series | [v4,1/2] boot: do not concatenate bootdev | expand |
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@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
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@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 > ; > >
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 ;
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@linux.vnet.ibm.com> --- slof/fs/boot.fs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)