# HG changeset patch # User Rob Landley # Date 1231141668 21600 # Node ID a4c26369ec4355ae584ec8d1e9516e144c36ef1d # Parent aaafa1ceaa91d5f0efa6e23461a71cceecd42f3f Accidentally changed cksum behavior with the -P flag, toggle its meaning. diff -r aaafa1ceaa91 -r a4c26369ec43 toys/cksum.c --- a/toys/cksum.c Mon Jan 05 01:05:43 2009 -0600 +++ b/toys/cksum.c Mon Jan 05 01:47:48 2009 -0600 @@ -18,7 +18,7 @@ If no files listed, copy from stdin. Filename "-" is a synonym for stdin. -L Little endian (defaults to big endian) - -P Skip pre-inversion + -P Pre-inversion -I Skip post-inversion -N No length */ @@ -43,7 +43,7 @@ static void do_cksum(int fd, char *name) { - unsigned crc = (toys.optflags&4) ? 0 : 0xffffffff; + unsigned crc = (toys.optflags&4) ? 0xffffffff : 0; uint64_t llen = 0, llen2; unsigned (*cksum)(unsigned crc, unsigned char c);