Accidentally changed cksum behavior with the -P flag, toggle its meaning.
diff --git a/toys/cksum.c b/toys/cksum.c
index 9b61667..69609a2 100644
--- a/toys/cksum.c
+++ b/toys/cksum.c
@@ -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);