Skip to content

Commit 6c7bc6a

Browse files
martin-gpyigaw
authored andcommitted
nvme-print: add subsystype to the list-subsys output
The nvme list-subsys and show-topology outputs misses out on the subsystype details. Add the same. Signed-off-by: Martin George <marting@netapp.com>
1 parent 8642daa commit 6c7bc6a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

nvme-print-json.c

+2
Original file line numberDiff line numberDiff line change
@@ -2466,6 +2466,7 @@ static void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana)
24662466
obj_add_str(subsystem_attrs, "Name", nvme_subsystem_get_name(s));
24672467
obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s));
24682468
obj_add_str(subsystem_attrs, "IOPolicy", nvme_subsystem_get_iopolicy(s));
2469+
obj_add_str(subsystem_attrs, "Type", nvme_subsystem_get_type(s));
24692470

24702471
array_add_obj(subsystems, subsystem_attrs);
24712472
paths = json_create_array();
@@ -4360,6 +4361,7 @@ static void json_simple_topology(nvme_root_t r)
43604361
obj_add_str(subsystem_attrs, "Name", nvme_subsystem_get_name(s));
43614362
obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s));
43624363
obj_add_str(subsystem_attrs, "IOPolicy", nvme_subsystem_get_iopolicy(s));
4364+
obj_add_str(subsystem_attrs, "Type", nvme_subsystem_get_type(s));
43634365

43644366
array_add_obj(subsystems, subsystem_attrs);
43654367
namespaces = json_create_array();

nvme-print-stdout.c

+2
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,8 @@ static void stdout_subsys_config(nvme_subsystem_t s)
10731073
nvme_host_get_hostnqn(nvme_subsystem_get_host(s)));
10741074
printf("%*s iopolicy=%s\n", len, " ",
10751075
nvme_subsystem_get_iopolicy(s));
1076+
printf("%*s type=%s\n", len, " ",
1077+
nvme_subsystem_get_type(s));
10761078
}
10771079

10781080
static void stdout_subsystem(nvme_root_t r, bool show_ana)

0 commit comments

Comments
 (0)