CBFS: Change the signature of cbfs_decompress.

Instead of returning 0 on success and -1 on error, return the decompressed
size of the data on success and 0 on error. The decompressed size is useful
information to have that was being thrown away in that function.

Change-Id: If787201aa61456b1e47feaf3a0071c753fa299a3
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Reviewed-on: http://review.coreboot.org/3578
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Gabe Black
2013-07-01 04:57:37 -07:00
committed by Patrick Georgi
parent f31eacca62
commit 0c605a5a6c
7 changed files with 24 additions and 28 deletions

View File

@@ -217,7 +217,7 @@ struct cbfs_file *cbfs_get_file(struct cbfs_media *media, const char *name);
void *cbfs_get_file_content(struct cbfs_media *media, const char *name,
int type);
/* returns 0 on success, -1 on failure */
/* returns decompressed size on success, 0 on failure */
int cbfs_decompress(int algo, void *src, void *dst, int len);
/* returns a pointer to CBFS master header, or CBFS_HEADER_INVALID_ADDRESS