Only the first byte of the wanted csum is printed:
checksum verify failed on 65536 found
DA97CF61 wanted 6B
checksum verify failed on 65536 found
DA97CF61 wanted
6BC3870D
Also add leading zeros to the format.
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
if (verify) {
if (memcmp_extent_buffer(buf, result, 0, csum_size)) {
- printk("checksum verify failed on %llu found %X "
- "wanted %X\n", (unsigned long long)buf->start,
- *((int *)result), *((char *)buf->data));
+ printk("checksum verify failed on %llu found %08X "
+ "wanted %08X\n", (unsigned long long)buf->start,
+ *((u32 *)result), *((u32*)(char *)buf->data));
free(result);
return 1;
}