NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/54726: cksum(1) doesn't inform you of passed checks
>Number: 54726
>Category: bin
>Synopsis: cksum(1) doesn't inform you of passed checks
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Dec 01 06:25:00 +0000 2019
>Originator: Edgar Pettijohn III
>Release: 8.1
>Organization:
>Environment:
NetBSD localhost 8.1 NetBSD 8.1 (GENERIC) #0: Fri May 31 08:43:59 UTC 2019 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When using cksum(1) to test source tarballs I noticed there was no output.
localhost$ cat MD5 | /usr/bin/cksum -c
localhost$
This struck me as odd. So after reading the manual it would appear the only way to know that the files were ok is to:
localhost$ echo $?
0
Which doesn't seem very user friendly.
>How-To-Repeat:
Use cksum(1) to verify files.
>Fix:
Index: cksum.c
===================================================================
RCS file: /cvsroot/src/usr.bin/cksum/cksum.c,v
retrieving revision 1.48
diff -r1.48 cksum.c
355d354
<
366d364
<
456a455,458
> } else {
> if (hash)
> printf("(%s) ", hash->hashname);
> printf("%s: PASSED\n", filename);
459d460
<
localhost$ cat MD5 | ~/bin/cksum -c
(MD5) gnusrc.tgz: PASSED
(MD5) sharesrc.tgz: PASSED
(MD5) src.tgz: PASSED
(MD5) syssrc.tgz: PASSED
(MD5) xsrc.tgz: PASSED
Much nicer :)
Home |
Main Index |
Thread Index |
Old Index