Skip to content

Commit

Permalink
zdb: Fix printf formatting of a uint64_t
Browse files Browse the repository at this point in the history
This fixes the build on 32-bit platforms.

Fixes:	dc91e74 ("zdb: dump ZAP_FLAG_UINT64_KEY ZAPs properly (#16334)")
  • Loading branch information
markjdb authored and bsdjhb committed Nov 12, 2024
2 parents 16e4553 + f029f62 commit 654e0c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sys/contrib/openzfs/cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,8 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);

if (key64)
(void) printf("\t\t0x%010lx = ",
*(uint64_t *)attr.za_name);
(void) printf("\t\t0x%010llx = ",
(u_longlong_t)*(uint64_t *)attr.za_name);
else
(void) printf("\t\t%s = ", attr.za_name);

Expand Down
4 changes: 2 additions & 2 deletions sys/contrib/subrepo-openzfs/cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,8 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
!!(zap_getflags(zc.zc_zap) & ZAP_FLAG_UINT64_KEY);

if (key64)
(void) printf("\t\t0x%010lx = ",
*(uint64_t *)attr.za_name);
(void) printf("\t\t0x%010llx = ",
(u_longlong_t)*(uint64_t *)attr.za_name);
else
(void) printf("\t\t%s = ", attr.za_name);

Expand Down

0 comments on commit 654e0c4

Please sign in to comment.