diff options
author | Simon Glass <sjg@chromium.org> | 2013-05-07 06:11:58 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-05-14 15:37:25 -0400 |
commit | ab9efc665a5695cc7ff7bcb35b2d6bb5726bb9f3 (patch) | |
tree | 75f327deb9361f4e3217c5c3d6e9deb4f1bfcc00 /include/image.h | |
parent | b8da8366500f7a88f1f5117f22f713fe920bcdd9 (diff) | |
download | u-boot-imx-ab9efc665a5695cc7ff7bcb35b2d6bb5726bb9f3.zip u-boot-imx-ab9efc665a5695cc7ff7bcb35b2d6bb5726bb9f3.tar.gz u-boot-imx-ab9efc665a5695cc7ff7bcb35b2d6bb5726bb9f3.tar.bz2 |
image: Move hash checking into its own function
The existing function is long and most of the code is indented a long
way. Before adding yet more code, split this out into its own function.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de> (v1)
Diffstat (limited to 'include/image.h')
-rw-r--r-- | include/image.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/image.h b/include/image.h index 59e8064..507ce42 100644 --- a/include/image.h +++ b/include/image.h @@ -43,12 +43,17 @@ #define CONFIG_OF_LIBFDT 1 #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ +#define IMAGE_ENABLE_IGNORE 0 + #else #include <lmb.h> #include <asm/u-boot.h> #include <command.h> +/* Take notice of the 'ignore' property for hashes */ +#define IMAGE_ENABLE_IGNORE 1 + #endif /* USE_HOSTCC */ #if defined(CONFIG_FIT) @@ -607,9 +612,6 @@ int fit_image_get_data(const void *fit, int noffset, int fit_image_hash_get_algo(const void *fit, int noffset, char **algo); int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value, int *value_len); -#ifndef USE_HOSTCC -int fit_image_hash_get_ignore(const void *fit, int noffset, int *ignore); -#endif int fit_set_timestamp(void *fit, int noffset, time_t timestamp); int fit_set_hashes(void *fit); |