From 3634a930292127faab0ba653badf4966fe0fcfb9 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sun, 16 Feb 2025 15:36:55 +0900 Subject: [PATCH] nvme-print-binary: fix to output dispersed ns participating nss log length Previously only the log header output since the log length is changeable. The changes to output the changeable log length correctly. Signed-off-by: Tokunori Ikegami --- nvme-print-binary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvme-print-binary.c b/nvme-print-binary.c index bc88743b..2e9d7724 100644 --- a/nvme-print-binary.c +++ b/nvme-print-binary.c @@ -2,6 +2,7 @@ #include "nvme-print.h" #include "util/logging.h" +#include "common.h" static struct print_ops binary_print_ops; @@ -319,7 +320,7 @@ static void binary_rotational_media_info_log(struct nvme_rotational_media_info_l static void binary_dispersed_ns_psub_log(struct nvme_dispersed_ns_participating_nss_log *log) { - d_raw((unsigned char *)log, sizeof(*log)); + d_raw((unsigned char *)log, sizeof(*log) + le64_to_cpu(log->numpsub) * NVME_NQN_LENGTH); } static void binary_reachability_groups_log(struct nvme_reachability_groups_log *log, __u64 len) -- 2.50.1