Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix zdb -R for raw flag
Browse files Browse the repository at this point in the history
Write was returing wrong size due to incorrect handle.
datacore-skumar committed Jan 19, 2021
1 parent c1864c4 commit 237b5d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ZFSin/zfs/cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
@@ -5061,7 +5061,13 @@ zdb_dump_block_raw(void *buf, uint64_t size, int flags)
{
if (flags & ZDB_FLAG_BSWAP)
byteswap_uint64_array(buf, size);
#ifdef _WIN32
HANDLE hStdout;
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
VERIFY(write(hStdout, buf, size) == size);
#else
VERIFY(write(_fileno(stdout), buf, size) == size);
#endif
}

static void

0 comments on commit 237b5d3

Please sign in to comment.