summaryrefslogtreecommitdiff
path: root/util/cbfstool/common.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-10-23 17:38:40 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-10-25 13:23:15 +0100
commit5213c53f6f126bf79ca2849d7d04a0e5141811ea (patch)
treeaaf45f052b52a6c8c33a80d8a1ce51093c28ab54 /util/cbfstool/common.h
parentcd9ba8ac034d9a693066ac3226332053f744299e (diff)
downloadcoreboot-5213c53f6f126bf79ca2849d7d04a0e5141811ea.tar.xz
cbfstool: have decompress functions provide ouput data size
Currently cbfs stage files that are compressed do not have the decompressed size readily available. Therefore there's no good way to know actual size of data after it is decompressed. Optionally return the decompressed data size if requested. Change-Id: If371753d28d0ff512118d8bc06fdd48f4a0aeae7 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/12173 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/common.h')
-rw-r--r--util/cbfstool/common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index e889e52704..4920d76f59 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -153,7 +153,8 @@ typedef int (*comp_func_ptr) (char *in, int in_len, char *out, int *out_len);
* Returns 0 on error,
* != 0 otherwise, depending on the decompressing function.
*/
-typedef int (*decomp_func_ptr) (char *in, int in_len, char *out, int out_len);
+typedef int (*decomp_func_ptr) (char *in, int in_len, char *out, int out_len,
+ size_t *actual_size);
enum comp_algo { CBFS_COMPRESS_NONE = 0, CBFS_COMPRESS_LZMA = 1 };
@@ -187,7 +188,8 @@ void print_supported_filetypes(void);
/* lzma/lzma.c */
int do_lzma_compress(char *in, int in_len, char *out, int *out_len);
-int do_lzma_uncompress(char *dst, int dst_len, char *src, int src_len);
+int do_lzma_uncompress(char *dst, int dst_len, char *src, int src_len,
+ size_t *actual_size);
/* xdr.c */
struct xdr {