diff --git a/common/image-fit.c b/common/image-fit.c index a69b716b2b..1327039cf1 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1094,7 +1094,7 @@ int fit_set_timestamp(void *fit, int noffset, time_t timestamp) return 0; } -int fit_set_totalsize(void *fit, int noffset, time_t totalsize) +int fit_set_totalsize(void *fit, int noffset, int totalsize) { uint32_t t; int ret; @@ -1102,12 +1102,8 @@ int fit_set_totalsize(void *fit, int noffset, time_t totalsize) t = cpu_to_uimage(totalsize); ret = fdt_setprop(fit, noffset, FIT_TOTALSIZE_PROP, &t, sizeof(uint32_t)); - if (ret) { - printf("Can't set '%s' property for '%s' node (%s)\n", - FIT_TOTALSIZE_PROP, fit_get_name(fit, noffset, NULL), - fdt_strerror(ret)); + if (ret) return ret == -FDT_ERR_NOSPACE ? -ENOSPC : -1; - } return 0; } diff --git a/include/image.h b/include/image.h index 6f642704e8..9ddbc50324 100644 --- a/include/image.h +++ b/include/image.h @@ -1026,7 +1026,7 @@ int fit_image_check_hash(const void *fit, int noffset, const void *data, size_t size, char **err_msgp); int fit_set_timestamp(void *fit, int noffset, time_t timestamp); -int fit_set_totalsize(void *fit, int noffset, time_t totalsize); +int fit_set_totalsize(void *fit, int noffset, int totalsize); int fit_get_image_defconf_node(const void *fit, int *images_noffset, int *def_noffset);