]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: (sgi) fix checksum calculation
authorKarel Zak <kzak@redhat.com>
Thu, 30 May 2013 15:43:03 +0000 (17:43 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:58 +0000 (16:46 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/pt-sgi.h

index 36b1a67fb31eb316664a45c131e2d5073d3e55e0..15f355b84c5437eaaa4055541a6db9dd93238996 100644 (file)
@@ -100,7 +100,7 @@ static inline uint32_t sgi_pt_checksum(struct sgi_disklabel *label)
        i = sizeof(*label) / sizeof(*ptr);
 
        while (i--)
-               sum += be32_to_cpu(ptr[i]);
+               sum -= be32_to_cpu(ptr[i]);
 
        return sum;
 }