mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Hubert Feurstein <h.feurstein@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/2] common/partition: check only for partition table types
Date: Fri, 19 Apr 2013 10:46:05 +0200	[thread overview]
Message-ID: <1366361165-28803-2-git-send-email-h.feurstein@gmail.com> (raw)
In-Reply-To: <1366361165-28803-1-git-send-email-h.feurstein@gmail.com>

The detection of the partition table fails when we have a barebox image
in the MBR. So check only for partition table types.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
---
 common/partitions.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/partitions.c b/common/partitions.c
index dd25160..683b258 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -89,7 +89,7 @@ static struct partition_parser *partition_parser_get_by_filetype(uint8_t *buf)
 	struct partition_parser *parser;
 
 	/* first new partition table as EFI GPT */
-	type = file_detect_type(buf, SECTOR_SIZE * 2);
+	type = file_detect_partition_table(buf, SECTOR_SIZE * 2);
 
 	list_for_each_entry(parser, &partition_parser_list, list) {
 		if (parser->type == type)
@@ -100,7 +100,7 @@ static struct partition_parser *partition_parser_get_by_filetype(uint8_t *buf)
 	 * so if EFI GPT not enable take it as MBR
 	 * useful for compatibility
 	 */
-	type = file_detect_type(buf, SECTOR_SIZE);
+	type = file_detect_partition_table(buf, SECTOR_SIZE);
 
 	list_for_each_entry(parser, &partition_parser_list, list) {
 		if (parser->type == type)
-- 
1.8.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-04-19  8:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  8:46 [PATCH 1/2] common/filetype: move partition-table detection into own function Hubert Feurstein
2013-04-19  8:46 ` Hubert Feurstein [this message]
2013-04-19 15:46 ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-29  7:35 ` Sascha Hauer

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=1366361165-28803-2-git-send-email-h.feurstein@gmail.com \
    --to=h.feurstein@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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