aboutsummaryrefslogtreecommitdiff
path: root/src/commonlib/cbfs.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-03-13 16:43:34 -0700
committerJulius Werner <jwerner@chromium.org>2020-12-03 00:00:33 +0000
commitd477565dbd6e9b6467f49c84a4f05047ffa22682 (patch)
tree864556875c6b3e15b5cb35193db29af542ae7e8e /src/commonlib/cbfs.c
parent9d0cc2aea918eced42dc3825c1ac94d0d4fbc380 (diff)
cbfstool: Use cbfs_serialized.h and standard vboot helpers
This patch reduces some code duplication in cbfstool by switching it to use the CBFS data structure definitions in commonlib rather than its own private copy. In addition, replace a few custom helpers related to hash algorithms with the official vboot APIs of the same purpose. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I22eae1bcd76d85fff17749617cfe4f1de55603f4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41117 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Diffstat (limited to 'src/commonlib/cbfs.c')
-rw-r--r--src/commonlib/cbfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commonlib/cbfs.c b/src/commonlib/cbfs.c
index 999c35e52a..f256938d5f 100644
--- a/src/commonlib/cbfs.c
+++ b/src/commonlib/cbfs.c
@@ -335,7 +335,7 @@ int cbfs_vb2_hash_contents(const struct region_device *cbfs,
if (cbfsf_file_type(fh, &ftype))
return VB2_ERROR_UNKNOWN;
- if (ftype == CBFS_TYPE_DELETED || ftype == CBFS_TYPE_DELETED2)
+ if (ftype == CBFS_TYPE_DELETED || ftype == CBFS_TYPE_NULL)
continue;
rv = cbfs_extend_hash_with_offset(&ctx, cbfs, &fh->data);