linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org, benh@kernel.crashing.org, aik@ozlabs.ru,
	dvaleev@suse.com
Subject: Re: [PATCH SLOF 1/5] disk-label: simplify gpt-prep-partition? routine
Date: Tue, 23 Jun 2015 09:08:43 +0200	[thread overview]
Message-ID: <20150623090843.6a4cf0a7@thh440s> (raw)
In-Reply-To: <1434959987-8530-2-git-send-email-nikunj@linux.vnet.ibm.com>

On Mon, 22 Jun 2015 13:29:43 +0530
Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> wrote:

> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
> ---
>  slof/fs/packages/disk-label.fs | 36 +++++++++++++-----------------------
>  1 file changed, 13 insertions(+), 23 deletions(-)
> 
> diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs
> index fe1c25e..2305eee 100644
> --- a/slof/fs/packages/disk-label.fs
> +++ b/slof/fs/packages/disk-label.fs
> @@ -352,31 +352,21 @@ CONSTANT /gpt-part-entry
>     drop 0
>  ;
>  
> -\ Check for GPT PReP partition GUID
> -9E1A2D38     CONSTANT GPT-PREP-PARTITION-1
> -C612         CONSTANT GPT-PREP-PARTITION-2
> -4316         CONSTANT GPT-PREP-PARTITION-3
> -AA26         CONSTANT GPT-PREP-PARTITION-4
> -8B49521E5A8B CONSTANT GPT-PREP-PARTITION-5
> +\ Check for GPT PReP partition GUID. Only first 3 blocks are
> +\ byte-swapped treating last two blocks as contigous for simplifying
> +\ comparison
> +9E1A2D38            CONSTANT GPT-PREP-PARTITION-1
> +C612                CONSTANT GPT-PREP-PARTITION-2
> +4316                CONSTANT GPT-PREP-PARTITION-3
> +AA268B49521E5A8B    CONSTANT GPT-PREP-PARTITION-4
>  
>  : gpt-prep-partition? ( -- true|false )
> -   block gpt-part-entry>part-type-guid l@-le GPT-PREP-PARTITION-1 = IF
> -      block gpt-part-entry>part-type-guid 4 + w@-le
> -      GPT-PREP-PARTITION-2 = IF
> -         block gpt-part-entry>part-type-guid 6 + w@-le
> -         GPT-PREP-PARTITION-3 = IF
> -            block gpt-part-entry>part-type-guid 8 + w@
> -            GPT-PREP-PARTITION-4 = IF
> -               block gpt-part-entry>part-type-guid a + w@
> -               block gpt-part-entry>part-type-guid c + l@ swap lxjoin
> -               GPT-PREP-PARTITION-5 = IF
> -                   TRUE EXIT
> -               THEN
> -            THEN
> -         THEN
> -      THEN
> -   THEN
> -   FALSE
> +   block gpt-part-entry>part-type-guid
> +   dup l@-le     GPT-PREP-PARTITION-1 <> IF DROP FALSE EXIT THEN
> +   dup 4 + w@-le GPT-PREP-PARTITION-2 <> IF DROP FALSE EXIT THEN
> +   dup 6 + w@-le GPT-PREP-PARTITION-3 <> IF DROP FALSE EXIT THEN
> +       8 + x@    GPT-PREP-PARTITION-4 <> IF FALSE EXIT THEN
> +   TRUE
>  ;
>  
>  : load-from-gpt-prep-partition ( addr -- size )

Also change DROP, FALSE and TRUE to lowercase, as Segher
suggested with patch 3? Apart from that, looks fine to me.

Reviewed-by: Thomas Huth <thuth@redhat.com>

  reply	other threads:[~2015-06-23  7:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22  7:59 [PATCH SLOF 0/5] GPT fixes/cleanup and LVM support with FAT Nikunj A Dadhania
2015-06-22  7:59 ` [PATCH SLOF 1/5] disk-label: simplify gpt-prep-partition? routine Nikunj A Dadhania
2015-06-23  7:08   ` Thomas Huth [this message]
2015-06-22  7:59 ` [PATCH SLOF 2/5] introduce 8-byte LE helpers Nikunj A Dadhania
2015-06-23  7:09   ` Thomas Huth
2015-06-22  7:59 ` [PATCH SLOF 3/5] disk-label: introduce helper to check fat filesystem Nikunj A Dadhania
2015-06-22 19:35   ` Segher Boessenkool
2015-06-23  6:06     ` Nikunj A Dadhania
2015-06-22  7:59 ` [PATCH SLOF 4/5] disk-label: add support for booting from GPT FAT partition Nikunj A Dadhania
2015-06-23  7:34   ` Thomas Huth
2015-06-24  2:10     ` Segher Boessenkool
2015-06-24  5:29       ` Nikunj A Dadhania
2015-06-24  5:33     ` Nikunj A Dadhania
2015-06-22  7:59 ` [PATCH SLOF 5/5] disk-label: make gpt detection code more robust Nikunj A Dadhania
2015-06-23  7:46   ` Thomas Huth
2015-06-24  5:34     ` Nikunj A Dadhania

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150623090843.6a4cf0a7@thh440s \
    --to=thuth@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=benh@kernel.crashing.org \
    --cc=dvaleev@suse.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nikunj@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).