cbfstool: Fix incorrect CBFS free space by old cbfstool.
commit49fcd75564e8308d695cf44f54e0e92d693df69b
authorHung-Te Lin <hungte@chromium.org>
Mon, 28 Jan 2013 19:16:20 +0000 (29 03:16 +0800)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Tue, 5 Feb 2013 21:26:58 +0000 (5 22:26 +0100)
tree4083f4d70d9b3856989492ea18766f070d07faa5
parentc03d9b0c4387f7218e6c9c7d94cf86a5e2b3943e
cbfstool: Fix incorrect CBFS free space by old cbfstool.

Old cbfstool may produce CBFS image with calculation error in size of last empty
entry, and then corrupts master header data when you really use every bit in
last entry. This fix will correct free space size when you load ROM images with
cbfs_image_from_file.

Change-Id: I2ada319728ef69ab9296ae446c77d37e05d05fce
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: http://review.coreboot.org/2211
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
util/cbfstool/cbfs_image.c