[PATCH 3/6] bootm: fit: Print error when image is not hashed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When fit is configured to check hashes print an error when an image
does not contain hashes instead of failing silently.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/image-fit.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 4f5c1f1..a6e1082 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -436,9 +436,12 @@ static int fit_open_image(struct fit_handle *handle, const char *unit, const voi
 			if (ret < 0)
 				return ret;
 		}
+
+		if (ret < 0) {
+			pr_err("image '%s': '%s' does not have hashes\n", unit, desc);
+			return ret;
+		}
 	}
-	if (ret < 0)
-		return ret;
 
 	*outdata = data;
 	*outsize = data_len;
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux