- if (memcmp (block, buf + ofs, BLOCK_SIZE))
- {
- printf ("Expected data:\n");
- hex_dump (ofs, buf + ofs, BLOCK_SIZE, false);
- printf ("Actually read data:\n");
- hex_dump (ofs, block, BLOCK_SIZE, false);
- fail ("%d bytes at offset %zu differed from expected",
- (int) BLOCK_SIZE, ofs);
- }
+ compare_bytes (block, buf + ofs, BLOCK_SIZE, ofs, filename);