Hi Sumit,

On 2026-09-28T06:40:33, Sumit Singh Dhami <[email protected]> wrote:
> disk: part_efi: read full GPT partition attributes
>
> gpt_fill_pte() writes the full 64-bit GPT partition attributes field
> when CONFIG_PARTITION_ATTR is enabled. However, part_get_info_efi(),
> the counterpart function used to read a partition's info back from an
> existing GPT never populated gpt_attr/gpt_attr_valid.

If you are using an AI tool for this, please set it up to use present
tense for commits :-)

>
> Populate gpt_attr from the on-disk GPT entry's raw attributes field,
> and set gpt_attr_valid to true mirroring the write path in
> gpt_fill_pte().
>
> Signed-off-by: Sumit Singh Dhami <[email protected]>
>
> disk/part_efi.c | 2 ++
>  1 file changed, 2 insertions(+)

> diff --git a/disk/part_efi.c b/disk/part_efi.c
> @@ -306,6 +306,8 @@ static int __maybe_unused part_get_info_efi(struct 
> blk_desc *desc, int part,
> +     if (CONFIG_IS_ENABLED(PARTITION_ATTR))
> +             disk_partition_set_gpt_attr(info, gpt_pte.attributes.raw);

The accessor already compiles to nothing when PARTITION_ATTR is
disabled, so please drop the 'if' and call
disk_partition_set_gpt_attr() directly. That is the point of having
the accessor.

Regards,
Simon

Reply via email to