summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.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/cbfstool.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/cbfstool.c')
-rw-r--r--util/cbfstool/cbfstool.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index bf589a5a27..35747d3d68 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -881,12 +881,6 @@ static int cbfs_copy(void)
return cbfs_copy_instance(&image, param.copyoffset, param.size);
}
-static bool cbfs_is_legacy_format(struct buffer *buffer)
-{
- // Legacy CBFSes are those containing the deprecated CBFS master header.
- return cbfs_find_header(buffer->data, buffer->size, -1);
-}
-
static const struct command commands[] = {
{"add", "H:r:f:n:t:c:b:a:vh?", cbfs_add, true, true},
{"add-flat-binary", "H:r:f:n:l:e:c:b:vh?", cbfs_add_flat_binary, true,
@@ -1250,8 +1244,7 @@ int main(int argc, char **argv)
}
} else {
param.image_file =
- partitioned_file_reopen(image_name,
- cbfs_is_legacy_format);
+ partitioned_file_reopen(image_name);
}
if (!param.image_file)
return 1;