summaryrefslogtreecommitdiff
path: root/util/cbfstool/partitioned_file.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-09-11 18:34:39 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-09-28 10:13:33 +0000
commit2f953d304e02be9a2f4f6fbd86b41dd6c86ec5db (patch)
tree5653a8068aa81a15d5ef3a8b462137526a0d85e4 /util/cbfstool/partitioned_file.c
parent6dd99fcafe83fed2632a90821de6373516c14a0c (diff)
downloadcoreboot-2f953d304e02be9a2f4f6fbd86b41dd6c86ec5db.tar.xz
cbfstool: prefer fmap data over cbfs master header if it exists
Up to now, if both fmap and a master header existed, the master header was used. Now, use the master header only if no fmap is found. Change-Id: Iafbf2c9dc325597e23a9780b495549b5d912e9ad Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11629 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool/partitioned_file.c')
-rw-r--r--util/cbfstool/partitioned_file.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/util/cbfstool/partitioned_file.c b/util/cbfstool/partitioned_file.c
index 9d67832a54..041ef1168b 100644
--- a/util/cbfstool/partitioned_file.c
+++ b/util/cbfstool/partitioned_file.c
@@ -165,8 +165,7 @@ partitioned_file_t *partitioned_file_create(const char *filename,
return file;
}
-partitioned_file_t *partitioned_file_reopen(const char *filename,
- partitioned_file_flat_decider_t flat_override)
+partitioned_file_t *partitioned_file_reopen(const char *filename)
{
assert(filename);
@@ -174,11 +173,6 @@ partitioned_file_t *partitioned_file_reopen(const char *filename,
if (!file)
return NULL;
- if (flat_override && flat_override(&file->buffer)) {
- INFO("Opening image as a flat file in response to explicit request\n");
- return file;
- }
-
long fmap_region_offset = fmap_find((const uint8_t *)file->buffer.data,
file->buffer.size);
if (fmap_region_offset < 0) {
@@ -365,10 +359,3 @@ static bool select_parents_of(const struct fmap_area *parent, const void *arg)
}
const partitioned_file_fmap_selector_t partitioned_file_fmap_select_parents_of =
select_parents_of;
-
-static bool open_as_flat(unused struct buffer *buffer)
-{
- return true;
-}
-const partitioned_file_flat_decider_t partitioned_file_open_as_flat =
- open_as_flat;