cbfstool: Make cbfs_create_empty_entry build a more complete header

Pass the file type into it instead of creating an entry, then modifying the
header field again after the fact.

Change-Id: I655583218f5085035b0f80efff7f91a66b5b296e
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/11218
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi
2015-08-12 09:12:06 +02:00
parent 7fd14184fb
commit edf25d9076
2 changed files with 14 additions and 13 deletions

View File

@@ -101,7 +101,7 @@ int cbfs_remove_entry(struct cbfs_image *image, const char *name);
/* Initializes a new empty (type = NULL) entry with size and name in CBFS image.
* Returns 0 on success, otherwise (ex, not found) non-zero. */
int cbfs_create_empty_entry(struct cbfs_file *entry,
int cbfs_create_empty_entry(struct cbfs_file *entry, int type,
size_t len, const char *name);
/* Finds a location to put given content by specified criteria: