diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-22 22:55:49 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-03-14 19:18:27 -0400 |
commit | 3837ce65bd57991ebd7f8235db4040596d3125a4 (patch) | |
tree | ede2998fd140a6df42046f407add22c86ff14a18 /tools/imagetool.h | |
parent | d505a09c1e8fa512aeb3c077048d521f1be302ff (diff) | |
download | u-boot-imx-3837ce65bd57991ebd7f8235db4040596d3125a4.zip u-boot-imx-3837ce65bd57991ebd7f8235db4040596d3125a4.tar.gz u-boot-imx-3837ce65bd57991ebd7f8235db4040596d3125a4.tar.bz2 |
tools: Add a function to obtain the size of a file
This will be used in mkimage when working out the required size of the FIT
based on the files to be placed into it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/imagetool.h')
-rw-r--r-- | tools/imagetool.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/imagetool.h b/tools/imagetool.h index e0397f7..3cf42ac 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -181,6 +181,18 @@ int imagetool_save_subimage( ulong file_data, ulong file_len); +/** + * imagetool_get_filesize() - Utility function to obtain the size of a file + * + * This function prints a message if an error occurs, showing the error that + * was obtained. + * + * @params: mkimage parameters + * @fname: filename to check + * @return size of file, or -ve value on error + */ +int imagetool_get_filesize(struct image_tool_params *params, const char *fname); + /* * There is a c file associated with supported image type low level code * for ex. default_image.c, fit_image.c |