diff options
author | Julius Werner <jwerner@chromium.org> | 2020-04-02 15:49:34 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2020-12-03 00:07:05 +0000 |
commit | 7066a1e7b3f588c8c4ac0394c8c1f35e227dd552 (patch) | |
tree | df4f741a90ae966f05eb8ee5e595ad0eda54c315 /util/cbfstool/cbfs_image.h | |
parent | 48a6c018bcb8a182c4934d2788567e512d490f96 (diff) |
cbfstool: Rename cbfs_walk() to cbfs_legacy_walk()
This function name clashes with cbfs_walk() in the new commonlib CBFS
stack, so rename it to cbfs_legacy_walk(). While we could replace it
with the new commonlib implementation, it still has support for certain
features in the deprecated pre-FMAP CBFSes (such as non-standard header
alignment), which are needed to handle old files but probably not
something we'd want to burden the commonlib implementation with. So
until we decide to deprecate support for those files from cbfstool as
well, it seems easier to just keep the existing implementation here.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I37c7e7aa9a206372817d8d0b8f66d72bafb4f346
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41118
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool/cbfs_image.h')
-rw-r--r-- | util/cbfstool/cbfs_image.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h index cd44438db2..74c35c9443 100644 --- a/util/cbfstool/cbfs_image.h +++ b/util/cbfstool/cbfs_image.h @@ -117,16 +117,18 @@ int cbfs_create_empty_entry(struct cbfs_file *entry, int type, int32_t cbfs_locate_entry(struct cbfs_image *image, size_t size, size_t page_size, size_t align, size_t metadata_size); -/* Callback function used by cbfs_walk. +/* Callback function used by cbfs_legacy_walk. * Returns 0 on success, or non-zero to stop further iteration. */ typedef int (*cbfs_entry_callback)(struct cbfs_image *image, struct cbfs_file *file, void *arg); /* Iterates through all entries in CBFS image, and invoke with callback. - * Stops if callback returns non-zero values. + * Stops if callback returns non-zero values. Unlike the commonlib cbfs_walk(), + * this can deal with different alignments in legacy CBFS (with master header). * Returns number of entries invoked. */ -int cbfs_walk(struct cbfs_image *image, cbfs_entry_callback callback, void *arg); +int cbfs_legacy_walk(struct cbfs_image *image, cbfs_entry_callback callback, + void *arg); /* Primitive CBFS utilities */ |