[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2025-08-06 14:54:30 +01:00
parent 6fa901530a
commit 332241238e

View File

@@ -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 );