It is more common to have 0 mean OK, and -ve mean error. Change this
function to work the same way to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
}
ret = fit_config_verify(working_fdt, cfg_noffset);
- if (ret == 1)
+ if (ret == 0)
return CMD_RET_SUCCESS;
else
return CMD_RET_FAILURE;
images->fit_uname_cfg = fit_uname_config;
if (IMAGE_ENABLE_VERIFY && images->verify) {
puts(" Verifying Hash Integrity ... ");
- if (!fit_config_verify(fit, cfg_noffset)) {
+ if (fit_config_verify(fit, cfg_noffset)) {
puts("Bad Data Hash\n");
bootstage_error(bootstage_id +
BOOTSTAGE_SUB_HASH);
int fit_config_verify(const void *fit, int conf_noffset)
{
- return !fit_config_verify_required_sigs(fit, conf_noffset,
- gd_fdt_blob());
+ return fit_config_verify_required_sigs(fit, conf_noffset,
+ gd_fdt_blob());
}
image_set_host_blob(key_blob);
ret = fit_check_sign(fit_blob, key_blob);
-
- if (ret)
+ if (!ret)
ret = EXIT_SUCCESS;
else
ret = EXIT_FAILURE;