public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Gary Bisson <gary.bisson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [PATCH] disk: part_dos: update partition table entries after write
Date: Wed, 27 Jan 2021 21:19:44 +0100	[thread overview]
Message-ID: <20210127201944.9098-1-gary.bisson@boundarydevices.com> (raw)

Fixes issues when switching from GPT to MBR partition tables.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
Hi,

Sending this patch as a follow-up to the other one [1] doing the same
thing for GPT write.

Let me know if you have any questions.

Regards,
Gary

[1] https://lists.denx.de/pipermail/u-boot/2021-January/438764.html
---
 disk/part_dos.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/disk/part_dos.c b/disk/part_dos.c
index f431925745..470886f4bb 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -499,6 +499,9 @@ int write_mbr_sector(struct blk_desc *dev_desc, void *buf)
 		return 1;
 	}
 
+	/* Update the partition table entries*/
+	part_init(dev_desc);
+
 	return 0;
 }
 
-- 
2.29.2

             reply	other threads:[~2021-01-27 20:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 20:19 Gary Bisson [this message]
2021-01-27 20:56 ` [PATCH] disk: part_dos: update partition table entries after write Heinrich Schuchardt
2021-01-28  8:01   ` Gary Bisson
2021-01-28  8:10 ` [PATCH v2] " Gary Bisson
2021-01-28  8:18   ` Marek Szyprowski
2021-02-02 14:31   ` Tom Rini
2021-06-22  2:48     ` Da Xue
2021-06-22 14:10       ` 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=20210127201944.9098-1-gary.bisson@boundarydevices.com \
    --to=gary.bisson@boundarydevices.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