U-boot Archive mirror
 help / color / mirror / Atom feed
From: Kishan Dudhatra <kishan.dudhatra@siliconsignals.io>
To: u-boot@lists.denx.de
Cc: trini@konsulko.com, Kishan Dudhatra <kishan.dudhatra@siliconsignals.io>
Subject: [PATCH v2] cmd: gpt: initialize partition table
Date: Mon, 22 Apr 2024 23:47:33 +0530	[thread overview]
Message-ID: <20240422181733.179881-1-kishan.dudhatra@siliconsignals.io> (raw)

Change in v2:
	- Fix applies to all block devices, not just MMC.

If partition init is not completed within the gpt write,
the gpt partition list will not be updated.

Signed-off-by: Kishan Dudhatra <kishan.dudhatra@siliconsignals.io>

diff --git a/cmd/gpt.c b/cmd/gpt.c
index d7e96529a6..7aaf1889a5 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -643,6 +643,10 @@ static int gpt_default(struct blk_desc *blk_dev_desc, const char *str_part)
 	free(str_disk_guid);
 	free(partitions);
 
+	/* initialize partition table */
+	if (blk_enabled())
+		part_init(blk_dev_desc);
+
 	return ret;
 }
 
-- 
2.34.1


             reply	other threads:[~2024-04-22 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 18:17 Kishan Dudhatra [this message]
2024-05-03 22:21 ` [PATCH v2] cmd: gpt: initialize partition table Tom Rini

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=20240422181733.179881-1-kishan.dudhatra@siliconsignals.io \
    --to=kishan.dudhatra@siliconsignals.io \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).