From: Martin George Date: Sun, 18 Aug 2024 16:42:58 +0000 (+0530) Subject: nvme-print: add subsystype to the list-subsys output X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6c7bc6a711e69d8fd8453a9699439f2822e3f9fd;p=users%2Fsagi%2Fnvme-cli.git 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 --- diff --git a/nvme-print-json.c b/nvme-print-json.c index af90eba0..9101c483 100644 --- a/nvme-print-json.c +++ b/nvme-print-json.c @@ -2466,6 +2466,7 @@ static void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana) obj_add_str(subsystem_attrs, "Name", nvme_subsystem_get_name(s)); obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s)); obj_add_str(subsystem_attrs, "IOPolicy", nvme_subsystem_get_iopolicy(s)); + obj_add_str(subsystem_attrs, "Type", nvme_subsystem_get_type(s)); array_add_obj(subsystems, subsystem_attrs); paths = json_create_array(); @@ -4360,6 +4361,7 @@ static void json_simple_topology(nvme_root_t r) obj_add_str(subsystem_attrs, "Name", nvme_subsystem_get_name(s)); obj_add_str(subsystem_attrs, "NQN", nvme_subsystem_get_nqn(s)); obj_add_str(subsystem_attrs, "IOPolicy", nvme_subsystem_get_iopolicy(s)); + obj_add_str(subsystem_attrs, "Type", nvme_subsystem_get_type(s)); array_add_obj(subsystems, subsystem_attrs); namespaces = json_create_array(); diff --git a/nvme-print-stdout.c b/nvme-print-stdout.c index e23739a3..784792e1 100644 --- a/nvme-print-stdout.c +++ b/nvme-print-stdout.c @@ -1073,6 +1073,8 @@ static void stdout_subsys_config(nvme_subsystem_t s) nvme_host_get_hostnqn(nvme_subsystem_get_host(s))); printf("%*s iopolicy=%s\n", len, " ", nvme_subsystem_get_iopolicy(s)); + printf("%*s type=%s\n", len, " ", + nvme_subsystem_get_type(s)); } static void stdout_subsystem(nvme_root_t r, bool show_ana)