Skip to content

Commit bef6475

Browse files
birkelundkeithbusch
authored andcommitted
nvme-print: fix namespace descriptor human printing
9b2ce6c fixed the len accumulation, but only for the JSON printing. Fix it for human output as well. Reported-by: Narae Park <[email protected]> Signed-off-by: Klaus Jensen <[email protected]>
1 parent 9b2ce6c commit bef6475

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

nvme-print.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,22 +2622,22 @@ void nvme_show_id_ns_descs(void *data, unsigned nsid, enum nvme_print_flags flag
26222622
for (i = 0; i < 8; i++)
26232623
printf("%02x", eui64[i]);
26242624
printf("\n");
2625-
len += sizeof(eui64);
2625+
len = sizeof(eui64);
26262626
break;
26272627
case NVME_NIDT_NGUID:
26282628
memcpy(nguid, data + pos + sizeof(*cur), sizeof(nguid));
26292629
printf("nguid : ");
26302630
for (i = 0; i < 16; i++)
26312631
printf("%02x", nguid[i]);
26322632
printf("\n");
2633-
len += sizeof(nguid);
2633+
len = sizeof(nguid);
26342634
break;
26352635
#ifdef LIBUUID
26362636
case NVME_NIDT_UUID:
26372637
memcpy(uuid, data + pos + sizeof(*cur), 16);
26382638
uuid_unparse_lower(uuid, uuid_str);
26392639
printf("uuid : %s\n", uuid_str);
2640-
len += sizeof(uuid);
2640+
len = sizeof(uuid);
26412641
break;
26422642
#endif
26432643
default:

0 commit comments

Comments
 (0)