Skip to content

Commit

Permalink
Fixed crash in (debug build) zdb -R <poolname> <vdev>:<offset>:<size> (
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-kumar-soni authored Jan 5, 2021
1 parent 907876f commit c1864c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ZFSin/zfs/cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5072,7 +5072,7 @@ zdb_dump_block(char *label, void *buf, uint64_t size, int flags)
int do_bswap = !!(flags & ZDB_FLAG_BSWAP);
unsigned i, j;
const char *hdr;
char *c;
unsigned char *c;


if (do_bswap)
Expand All @@ -5088,7 +5088,7 @@ zdb_dump_block(char *label, void *buf, uint64_t size, int flags)
(u_longlong_t)(do_bswap ? BSWAP_64(d[i]) : d[i]),
(u_longlong_t)(do_bswap ? BSWAP_64(d[i + 1]) : d[i + 1]));

c = (char *)&d[i];
c = (unsigned char *)&d[i];
for (j = 0; j < 2 * sizeof (uint64_t); j++)
(void) printf("%c", isprint(c[j]) ? c[j] : '.');
(void) printf("\n");
Expand Down

0 comments on commit c1864c4

Please sign in to comment.