diff mbox series

[3/3,V4] parser: don't check hash for image of type ubiswap

Message ID 1561045268-20479-4-git-send-email-philippe.reynes@softathome.com
State Superseded
Headers show
Series add a new handler ubiswap to swap several ubi volume | expand

Commit Message

Philippe REYNES June 20, 2019, 3:41 p.m. UTC
When the signature is enabled, the parser check if
all the images has a hash. But an image of type
ubiswap don't provide a file, so no hash is provided
too.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 core/parser.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/core/parser.c b/core/parser.c
index 313201f..b681867 100644
--- a/core/parser.c
+++ b/core/parser.c
@@ -68,10 +68,11 @@  static int check_missing_hash(struct imglist *list)
 
 	LIST_FOREACH(image, list, next) {
 		/*
-		 * Skip "ubipartition" because there is no image
+		 * Skip "ubipartition" and "ubiswap" because there is no image
 		 * associated for this type
 		 */
 		if ( (strcmp(image->type, "ubipartition")) &&
+		     (strcmp(image->type, "ubiswap")) &&
 				(!IsValidHash(image->sha256))) {
 			ERROR("Hash not set for %s Type %s",
 				image->fname,