Skip to content

Commit 39cf8f6

Browse files
martin-gpyigaw
authored andcommitted
nvme-print: display serial num in list-subsys output
Include the subsys serial number in the list-subsys output. Signed-off-by: Martin George <[email protected]>
1 parent 583a06f commit 39cf8f6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

nvme-print-json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,6 +2543,8 @@ static void json_print_nvme_subsystem_list(nvme_root_t r, bool show_ana)
25432543
if (json_print_ops.flags & VERBOSE) {
25442544
obj_add_str(subsystem_attrs, "Model",
25452545
nvme_subsystem_get_model(s));
2546+
obj_add_str(subsystem_attrs, "Serial",
2547+
nvme_subsystem_get_serial(s));
25462548
obj_add_str(subsystem_attrs, "Firmware",
25472549
nvme_subsystem_get_fw_rev(s));
25482550
obj_add_str(subsystem_attrs, "IOPolicy",
@@ -4575,6 +4577,8 @@ static void json_simple_topology(nvme_root_t r)
45754577
if (json_print_ops.flags & VERBOSE) {
45764578
obj_add_str(subsystem_attrs, "Model",
45774579
nvme_subsystem_get_model(s));
4580+
obj_add_str(subsystem_attrs, "Serial",
4581+
nvme_subsystem_get_serial(s));
45784582
obj_add_str(subsystem_attrs, "Firmware",
45794583
nvme_subsystem_get_fw_rev(s));
45804584
obj_add_str(subsystem_attrs, "IOPolicy",

nvme-print-stdout.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,8 @@ static void stdout_subsys_config(nvme_subsystem_t s)
11141114
if (stdout_print_ops.flags & VERBOSE) {
11151115
printf("%*s model=%s\n", len, " ",
11161116
nvme_subsystem_get_model(s));
1117+
printf("%*s serial=%s\n", len, " ",
1118+
nvme_subsystem_get_serial(s));
11171119
printf("%*s firmware=%s\n", len, " ",
11181120
nvme_subsystem_get_fw_rev(s));
11191121
printf("%*s iopolicy=%s\n", len, " ",

0 commit comments

Comments
 (0)