On Mon, Sep 28, 2026 at 12:10:37PM +0530, Sumit Singh Dhami wrote:
> The 'gpt write' partition list syntax only allows setting the legacy
> BIOS-bootable bit via the 'bootable' key.
> 
> Parse an optional 'attrs=<value>' key when CONFIG_PARTITION_ATTR is
> enabled and store it via disk_partition_set_gpt_attr(),
> so that gpt_fill_pte() writes the requested 64-bit attributes value
> into the partition's GPT entry.
> 
> Signed-off-by: Sumit Singh Dhami <[email protected]>
> ---
>  cmd/gpt.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/cmd/gpt.c b/cmd/gpt.c
> index 205f696c807..f610c7aa6b5 100644
> --- a/cmd/gpt.c
> +++ b/cmd/gpt.c
> @@ -592,6 +592,17 @@ static int set_gpt_info(struct blk_desc *dev_desc,
>  
>               offset += parts[i].size + parts[i].start;
>  
> +             if (CONFIG_IS_ENABLED(PARTITION_ATTR)) {
> +                     /* attrs */
> +                     val = extract_val(tok, "attrs");
> +                     if (val) {      /* 'attrs' is optional */
> +                             if (extract_env(val, &p))
> +                                     p = val;
> +                             disk_partition_set_gpt_attr(&parts[i], 
> simple_strtoull(p, NULL, 0));

I'm pointing it out here and assuming you'll check the rest of the
series, checkpatch should have complained about this line being too
long, please fix globally, thanks.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to