Skip to content

Commit 3634a93

Browse files
ikegami-tigaw
authored andcommitted
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 <[email protected]>
1 parent ecab21c commit 3634a93

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nvme-print-binary.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include "nvme-print.h"
44
#include "util/logging.h"
5+
#include "common.h"
56

67
static struct print_ops binary_print_ops;
78

@@ -319,7 +320,7 @@ static void binary_rotational_media_info_log(struct nvme_rotational_media_info_l
319320

320321
static void binary_dispersed_ns_psub_log(struct nvme_dispersed_ns_participating_nss_log *log)
321322
{
322-
d_raw((unsigned char *)log, sizeof(*log));
323+
d_raw((unsigned char *)log, sizeof(*log) + le64_to_cpu(log->numpsub) * NVME_NQN_LENGTH);
323324
}
324325

325326
static void binary_reachability_groups_log(struct nvme_reachability_groups_log *log, __u64 len)

0 commit comments

Comments
 (0)