aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2009-01-05 01:47:48 -0600
committerRob Landley <rob@landley.net>2009-01-05 01:47:48 -0600
commitba3ed79b4e18988dfe637d44c875bb11c3cb9ad2 (patch)
treefee0fc911d5ac0b0ea186ed7500d1774b46583ad /toys
parentb15b8fa99ae53396145ea540106b74d37797f774 (diff)
downloadtoybox-ba3ed79b4e18988dfe637d44c875bb11c3cb9ad2.tar.gz
Accidentally changed cksum behavior with the -P flag, toggle its meaning.
Diffstat (limited to 'toys')
-rw-r--r--toys/cksum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/cksum.c b/toys/cksum.c
index 9b616671..69609a28 100644
--- a/toys/cksum.c
+++ b/toys/cksum.c
@@ -18,7 +18,7 @@ config CKSUM
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 unsigned cksum_le(unsigned crc, unsigned char c)
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);