From: Joshua Watt <jpewhacker@gmail.com>
To: u-boot@lists.denx.de
Cc: Joshua Watt <JPEWhacker@gmail.com>
Subject: [PATCH 2/2] cmd: mbr: Force DOS driver to be used for verify
Date: Fri, 23 Jun 2023 15:00:00 -0500 [thread overview]
Message-ID: <20230623200031.2689749-3-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20230623200031.2689749-1-JPEWhacker@gmail.com>
Forces the DOS partition type driver to be used when verifying the MBR.
This is particularly useful when using a hybrid MBR & GPT layout as
otherwise MBR verification would mostly likely fail since the GPT
partitions will be returned, even if the MBR is actually valid.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
cmd/mbr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/mbr.c b/cmd/mbr.c
index c269833eb8..ec99b66283 100644
--- a/cmd/mbr.c
+++ b/cmd/mbr.c
@@ -244,7 +244,7 @@ static int do_verify_mbr(struct blk_desc *dev, const char *str)
for (i = 0; i < count; i++) {
struct disk_partition p;
- if (part_get_info(dev, i + 1, &p))
+ if (part_get_info_by_type(dev, i + 1, PART_TYPE_DOS, &p))
goto fail;
if ((partitions[i].size && p.size != partitions[i].size) ||
--
2.33.0
next prev parent reply other threads:[~2023-06-24 22:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 19:59 [PATCH 0/2] Fix 'mbr' command with hybrid MBR/GPT Joshua Watt
2023-06-23 19:59 ` [PATCH 1/2] disk: part: Add API to get partitions with specific driver Joshua Watt
2023-06-26 9:07 ` Simon Glass
2023-06-28 13:33 ` Joshua Watt
2023-06-29 19:09 ` Simon Glass
2023-06-23 20:00 ` Joshua Watt [this message]
2023-07-03 13:39 ` [PATCH v2 0/5] Fix 'mbr' command with hybrid MBR/GPT Joshua Watt
2023-07-03 13:39 ` [PATCH v2 1/5] dm: test: Fix partition test to use mmc2 Joshua Watt
2023-07-04 2:40 ` Simon Glass
2023-07-05 0:16 ` Jaehoon Chung
2023-07-18 13:58 ` Tom Rini
2023-07-03 13:39 ` [PATCH v2 2/5] dm: test: Improve partition test error output Joshua Watt
2023-07-04 2:40 ` Simon Glass
2023-07-18 13:58 ` Tom Rini
2023-07-03 13:39 ` [PATCH v2 3/5] disk: part: Add API to get partitions with specific driver Joshua Watt
2023-07-04 2:40 ` Simon Glass
2023-07-18 13:58 ` Tom Rini
2023-07-03 13:39 ` [PATCH v2 4/5] dm: test: Add test for part_get_info_by_type Joshua Watt
2023-07-04 2:40 ` Simon Glass
2023-07-18 13:58 ` Tom Rini
2023-07-03 13:39 ` [PATCH v2 5/5] cmd: mbr: Force DOS driver to be used for verify Joshua Watt
2023-07-04 2:40 ` Simon Glass
2023-07-18 13:58 ` 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=20230623200031.2689749-3-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.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