mirror of
https://github.com/ipxe/ipxe
synced 2026-01-23 04:29:01 +03:00
[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:
@@ -86,7 +86,7 @@ int digest_exec ( int argc, char **argv, struct digest_algorithm *digest ) {
|
|||||||
|
|
||||||
/* Acquire image */
|
/* Acquire image */
|
||||||
if ( ( rc = imgacquire ( argv[i], 0, &image ) ) != 0 )
|
if ( ( rc = imgacquire ( argv[i], 0, &image ) ) != 0 )
|
||||||
continue;
|
return rc;
|
||||||
|
|
||||||
/* Calculate digest */
|
/* Calculate digest */
|
||||||
digest_init ( digest, ctx );
|
digest_init ( digest, ctx );
|
||||||
|
|||||||
Reference in New Issue
Block a user