From: Michael Brown Date: Wed, 6 Aug 2025 13:54:30 +0000 (+0100) Subject: [digest] Treat inability to acquire an image as a fatal error X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=332241238e3f1a2b519a1c8ea41fb52dbe0232f8;p=thirdparty%2Fipxe.git [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 --- 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 );