Fix checksum(1) --status emitting warnings.
This commit is contained in:
parent
3cb0752093
commit
cb67d87b9f
1 changed files with 2 additions and 2 deletions
|
@ -299,10 +299,10 @@ static int checklist_fp(FILE* fp,
|
|||
explicit_bzero(checksum, sizeof(checksum));
|
||||
free(checklist);
|
||||
free(checklist_sorted);
|
||||
if ( read_failures )
|
||||
if ( !silent && read_failures )
|
||||
warnx("WARNING: %zu listed %s could not be read",
|
||||
read_failures, read_failures == 1 ? "file" : "files");
|
||||
if ( check_failures )
|
||||
if ( !silent && check_failures )
|
||||
warnx("WARNING: %zu computed %s did NOT match",
|
||||
check_failures, check_failures == 1 ? "checksum" : "checksums");
|
||||
return read_failures ? 1 : check_failures ? 2 : 0;
|
||||
|
|
Loading…
Reference in a new issue