From: Gary Bisson <gary.bisson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2] disk: part_dos: update partition table entries after write
Date: Thu, 28 Jan 2021 09:10:07 +0100 [thread overview]
Message-ID: <20210128081007.10587-1-gary.bisson@boundarydevices.com> (raw)
In-Reply-To: <20210127201944.9098-1-gary.bisson@boundarydevices.com>
Fixes issues when switching from GPT to MBR partition tables.
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
Changes for v2:
- added part_init() inside write_mbr_partitions(), as suggested by
Heinrich
---
disk/part_dos.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/disk/part_dos.c b/disk/part_dos.c
index f431925745c..60addc6e00d 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -423,6 +423,9 @@ int write_mbr_partitions(struct blk_desc *dev,
ext_part_sect = next_ebr;
}
+ /* Update the partition table entries*/
+ part_init(dev_desc);
+
return 0;
}
@@ -499,6 +502,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
next prev parent reply other threads:[~2021-01-28 8:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 20:19 [PATCH] disk: part_dos: update partition table entries after write Gary Bisson
2021-01-27 20:56 ` Heinrich Schuchardt
2021-01-28 8:01 ` Gary Bisson
2021-01-28 8:10 ` Gary Bisson [this message]
2021-01-28 8:18 ` [PATCH v2] " 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=20210128081007.10587-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