[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180912083844.iegei2kobcz4b7ag@ws.net.home>
Date: Wed, 12 Sep 2018 10:38:44 +0200
From: Karel Zak <kzak@...hat.com>
To: Eugene Korenevsky <ekorenevsky@...il.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ard Biesheuvel <ard.biesheuvel@...aro.org>
Subject: Re: [PATCH v2] efi: take size of partition entry from GPT header
On Tue, Sep 11, 2018 at 07:15:27PM +0300, Eugene Korenevsky wrote:
> +static gpt_entry *get_gpt_entry(gpt_header *gpt_hdr, gpt_entry *ptes, u32 index)
> +{
> + return (gpt_entry *)((u8 *)ptes + gpt->sizeof_partition_entry * index);
I guess header use LE, so you need:
le32_to_cpu(gpt_hdr->sizeof_partition_entry)
Karel
--
Karel Zak <kzak@...hat.com>
http://karelzak.blogspot.com
Powered by blists - more mailing lists