From 332241238e3f1a2b519a1c8ea41fb52dbe0232f8 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 6 Aug 2025 14:54:30 +0100 Subject: [PATCH] [digest] Treat inability to acquire an image as a fatal error The "md5sum" and "sha1sum" commands were originally intended solely as debugging utilities, and would return success (with a warning message) even if the specified images did not exist. To minimise surprise and to be consistent with other commands, treat the inability to acquire an image as a fatal error. Signed-off-by: Michael Brown --- src/hci/commands/digest_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hci/commands/digest_cmd.c b/src/hci/commands/digest_cmd.c index 47a7339f1..20d33a5d8 100644 --- a/src/hci/commands/digest_cmd.c +++ b/src/hci/commands/digest_cmd.c @@ -86,7 +86,7 @@ int digest_exec ( int argc, char **argv, struct digest_algorithm *digest ) { /* Acquire image */ if ( ( rc = imgacquire ( argv[i], 0, &image ) ) != 0 ) - continue; + return rc; /* Calculate digest */ digest_init ( digest, ctx ); -- 2.47.2