Subject: Re: [PATCH SLOF 2/5] introduce 8-byte LE helpers

From: Thomas Huth <[email-masked]>
Date: Tue, 23 Jun 2015 09:09:57 +0200

On Mon, 22 Jun 2015 13:29:44 +0530
Nikunj A Dadhania <[email-masked]> wrote:

> Signed-off-by: Nikunj A Dadhania <[email-masked]>
> ---
>  slof/fs/little-endian.fs       | 6 ++++++
>  slof/fs/packages/disk-label.fs | 4 ++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/slof/fs/little-endian.fs b/slof/fs/little-endian.fs
> index f2e4e8d..6b4779e 100644
> --- a/slof/fs/little-endian.fs
> +++ b/slof/fs/little-endian.fs
> @@ -17,6 +17,9 @@ here c@ ef = CONSTANT ?littleendian
>  
>  ?bigendian [IF]
>  
> +: x!-le >r xbflip r> x! ;
> +: x@-le x@ xbflip ;
> +
>  : l!-le  >r lbflip r> l! ;
>  : l@-le  l@ lbflip ;
>  
> @@ -47,6 +50,9 @@ here c@ ef = CONSTANT ?littleendian
>  
>  [ELSE]
>  
> +: x!-le x! ;
> +: x@-le x@ ;
> +
>  : l!-le  l! ;
>  : l@-le  l@ ;
>  
> diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs
> index 2305eee..2cf1b85 100644
> --- a/slof/fs/packages/disk-label.fs
> +++ b/slof/fs/packages/disk-label.fs
> @@ -384,8 +384,8 @@ AA268B49521E5A8B    CONSTANT GPT-PREP-PARTITION-4
>           debug-disk-label? IF
>              ." GPT PReP partition found " cr
>           THEN
> -         block gpt-part-entry>first-lba x@ xbflip
> -         block gpt-part-entry>last-lba x@ xbflip
> +         block gpt-part-entry>first-lba x@-le
> +         block gpt-part-entry>last-lba x@-le
>           over - 1+                 ( addr offset len )
>           swap                      ( addr len offset )
>           block-size * to part-offset

Reviewed-by: Thomas Huth <[email-masked]>