summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/cbfs_image.h
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-01-29 02:29:49 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-02-05 22:25:20 +0100
commit0f8af71f1a40e8ae960ba616cb9a5bf14f10fb13 (patch)
tree307b6c6ed395745f8769563bb3a32afe0922966a /util/cbfstool/cbfs_image.h
parent3bb035b095a0e4144adfa55fa45b2332e3a6c7d5 (diff)
downloadcoreboot-0f8af71f1a40e8ae960ba616cb9a5bf14f10fb13.tar.gz
coreboot-0f8af71f1a40e8ae960ba616cb9a5bf14f10fb13.tar.bz2
coreboot-0f8af71f1a40e8ae960ba616cb9a5bf14f10fb13.zip
cbfstool: Use cbfs_image API for "extract" command.
Change the "extract" command to use cbfs_export_entry API. Nothing changed in its usage. To verify, run "cbfstool coreboot.rom extract -f blah -n blah" and check if the raw type file is correctly extracted. Change-Id: I1ed280d47a2224a9d1213709f6b459b403ce5055 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: http://review.coreboot.org/2207 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/cbfstool/cbfs_image.h')
-rw-r--r--util/cbfstool/cbfs_image.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h
index 822f6d54b433..09051c382540 100644
--- a/util/cbfstool/cbfs_image.h
+++ b/util/cbfstool/cbfs_image.h
@@ -38,6 +38,14 @@ int cbfs_image_write_file(struct cbfs_image *image, const char *filename);
/* Releases the CBFS image. Returns 0 on success, otherwise non-zero. */
int cbfs_image_delete(struct cbfs_image *image);
+/* Returns a pointer to entry by name, or NULL if name is not found. */
+struct cbfs_file *cbfs_get_entry(struct cbfs_image *image, const char *name);
+
+/* Exports an entry to external file.
+ * Returns 0 on success, otherwise (ex, not found) non-zero. */
+int cbfs_export_entry(struct cbfs_image *image, const char *entry_name,
+ const char *filename);
+
/* Callback function used by cbfs_walk.
* Returns 0 on success, or non-zero to stop further iteration. */
typedef int (*cbfs_entry_callback)(struct cbfs_image *image,