Skip to content

Commit 3ccb47d

Browse files
martin-gpyigaw
authored andcommitted
nvme-print: display model in list-subsys output
Include the subsys model as well in the list-subsys verbose output. Signed-off-by: Martin George <marting@netapp.com>
1 parent 2ca57aa commit 3ccb47d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

nvme-print-json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,8 @@ static void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana)
25412541
obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s));
25422542

25432543
if (json_print_ops.flags & VERBOSE) {
2544+
obj_add_str(subsystem_attrs, "Model",
2545+
nvme_subsystem_get_model(s));
25442546
obj_add_str(subsystem_attrs, "IOPolicy",
25452547
nvme_subsystem_get_iopolicy(s));
25462548
obj_add_str(subsystem_attrs, "Type",
@@ -4497,6 +4499,8 @@ static void json_simple_topology(nvme_root_t r)
44974499
obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s));
44984500

44994501
if (json_print_ops.flags & VERBOSE) {
4502+
obj_add_str(subsystem_attrs, "Model",
4503+
nvme_subsystem_get_model(s));
45004504
obj_add_str(subsystem_attrs, "IOPolicy",
45014505
nvme_subsystem_get_iopolicy(s));
45024506
obj_add_str(subsystem_attrs, "Type",

nvme-print-stdout.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,8 @@ static void stdout_subsys_config(nvme_subsystem_t s)
11121112
nvme_host_get_hostnqn(nvme_subsystem_get_host(s)));
11131113

11141114
if (stdout_print_ops.flags & VERBOSE) {
1115+
printf("%*s model=%s\n", len, " ",
1116+
nvme_subsystem_get_model(s));
11151117
printf("%*s iopolicy=%s\n", len, " ",
11161118
nvme_subsystem_get_iopolicy(s));
11171119
printf("%*s type=%s\n", len, " ",

0 commit comments

Comments
 (0)