Skip to content

Commit b6bd051

Browse files
martin-gpyigaw
authored andcommitted
netapp-ontapdev: add subsysname to regular output
Display the subsysname in the regular output as well. Signed-off-by: Martin George <[email protected]>
1 parent 191a098 commit b6bd051

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

plugins/netapp/netapp-nvme.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -611,21 +611,23 @@ static void netapp_ontapdevices_print_regular(struct ontapdevice_info *devices,
611611
unsigned long long lba;
612612
char size[128];
613613
char uuid_str[37] = " ";
614+
char subnqn[257], subsysname[65];
614615
int i;
615616

616617
char *formatstr = NULL;
617618
char basestr[] =
618-
"%s, Vserver %s, Namespace Path %s, NSID %d, UUID %s, %s\n";
619-
char columnstr[] = "%-16s %-25s %-50s %-4d %-38s %-9s\n";
619+
"%s, Vserver %s, Subsystem %s, Namespace Path %s, NSID %d, UUID %s, %s\n";
620+
char columnstr[] = "%-16s %-25s %-25s %-50s %-4d %-38s %-9s\n";
620621

621622
if (format == NNORMAL)
622623
formatstr = basestr;
623624
else if (format == NCOLUMN) {
624-
printf("%-16s %-25s %-50s %-4s %-38s %-9s\n",
625-
"Device", "Vserver", "Namespace Path",
625+
printf("%-16s %-25s %-25s %-50s %-4s %-38s %-9s\n",
626+
"Device", "Vserver", "Subsystem", "Namespace Path",
626627
"NSID", "UUID", "Size");
627-
printf("%-16s %-25s %-50s %-4s %-38s %-9s\n",
628+
printf("%-16s %-25s %-25s %-50s %-4s %-38s %-9s\n",
628629
"----------------", "-------------------------",
630+
"-------------------------",
629631
"--------------------------------------------------",
630632
"----", "--------------------------------------",
631633
"---------");
@@ -639,9 +641,11 @@ static void netapp_ontapdevices_print_regular(struct ontapdevice_info *devices,
639641
nvme_uuid_to_string(devices[i].uuid, uuid_str);
640642
netapp_get_ontap_labels(vsname, nspath,
641643
devices[i].log_data);
644+
ontap_get_subsysname(subnqn, subsysname,
645+
&devices[i].ctrl);
642646

643-
printf(formatstr, devices[i].dev, vsname, nspath,
644-
devices[i].nsid, uuid_str, size);
647+
printf(formatstr, devices[i].dev, vsname, subsysname,
648+
nspath, devices[i].nsid, uuid_str, size);
645649
return;
646650
}
647651
}
@@ -651,9 +655,10 @@ static void netapp_ontapdevices_print_regular(struct ontapdevice_info *devices,
651655
netapp_get_ns_size(size, &lba, &devices[i].ns);
652656
nvme_uuid_to_string(devices[i].uuid, uuid_str);
653657
netapp_get_ontap_labels(vsname, nspath, devices[i].log_data);
658+
ontap_get_subsysname(subnqn, subsysname, &devices[i].ctrl);
654659

655-
printf(formatstr, devices[i].dev, vsname, nspath,
656-
devices[i].nsid, uuid_str, size);
660+
printf(formatstr, devices[i].dev, vsname, subsysname,
661+
nspath, devices[i].nsid, uuid_str, size);
657662
}
658663
}
659664

0 commit comments

Comments
 (0)