From 1c38cdfe989d17b9be784d9b7d82a5d50e247c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Matu=C5=A1ka?= Date: Wed, 29 Nov 2023 18:18:30 +0100 Subject: [PATCH] zdb: fix printf() length for uint64_t devid Bug introduced in 213d6829673. Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Warner Losh Signed-off-by: Martin Matuska Closes #15606 --- cmd/zdb/zdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 486bec9910a4..777032bf82f6 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -2126,14 +2126,14 @@ dump_brt(spa_t *spa) continue; if (!brtvd->bv_initiated) { - printf("BRT: vdev %lu: empty\n", vdevid); + printf("BRT: vdev %" PRIu64 ": empty\n", vdevid); continue; } zdb_nicenum(brtvd->bv_totalcount, count, sizeof (count)); zdb_nicebytes(brtvd->bv_usedspace, used, sizeof (used)); zdb_nicebytes(brtvd->bv_savedspace, saved, sizeof (saved)); - printf("BRT: vdev %lu: refcnt %s; used %s; saved %s\n", + printf("BRT: vdev %" PRIu64 ": refcnt %s; used %s; saved %s\n", vdevid, count, used, saved); } @@ -2156,7 +2156,7 @@ dump_brt(spa_t *spa) uint64_t offset = *(uint64_t *)za.za_name; uint64_t refcnt = za.za_first_integer; - snprintf(dva, sizeof (dva), "%lu:%llx", vdevid, + snprintf(dva, sizeof (dva), "%" PRIu64 ":%llx", vdevid, (u_longlong_t)offset); printf("%-16s %-10llu\n", dva, (u_longlong_t)refcnt); }