* [PATCH nvme-cli] nvme-print: Print cntlid number for controller
@ 2024-04-05 12:10 Nilay Shroff
2024-04-07 21:55 ` Sagi Grimberg
2024-04-09 10:06 ` Daniel Wagner
0 siblings, 2 replies; 3+ messages in thread
From: Nilay Shroff @ 2024-04-05 12:10 UTC (permalink / raw)
To: linux-nvme; +Cc: kbusch, dwagner, gjoyce, nilay
Print the controller identifier number (cntlid) for the
nvme controller. The cntlid is printed if nvme list
verbose is specified.
Link: https://lore.kernel.org/all/20240326065752.164286-1-nilay@linux.ibm.com/
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
nvme-print-json.c | 1 +
nvme-print-stdout.c | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/nvme-print-json.c b/nvme-print-json.c
index fec72b9d..8cf057f2 100644
--- a/nvme-print-json.c
+++ b/nvme-print-json.c
@@ -3899,6 +3899,7 @@ static void json_detail_list(nvme_root_t t)
struct json_object *jpaths = json_create_array();
obj_add_str(jctrl, "Controller", nvme_ctrl_get_name(c));
+ obj_add_str(jctrl, "Cntlid", nvme_ctrl_get_cntlid(c));
obj_add_str(jctrl, "SerialNumber", nvme_ctrl_get_serial(c));
obj_add_str(jctrl, "ModelNumber", nvme_ctrl_get_model(c));
obj_add_str(jctrl, "Firmware", nvme_ctrl_get_firmware(c));
diff --git a/nvme-print-stdout.c b/nvme-print-stdout.c
index 795087ee..1b62a8e4 100644
--- a/nvme-print-stdout.c
+++ b/nvme-print-stdout.c
@@ -4802,8 +4802,9 @@ static bool stdout_detailed_ctrl(const char *name, void *arg)
c = htable_ctrl_get(&res->ht_c, name);
assert(c);
- printf("%-8s %-20s %-40s %-8s %-6s %-14s %-6s %-12s ",
+ printf("%-8s %-6s %-20s %-40s %-8s %-6s %-14s %-6s %-12s ",
nvme_ctrl_get_name(c),
+ nvme_ctrl_get_cntlid(c),
nvme_ctrl_get_serial(c),
nvme_ctrl_get_model(c),
nvme_ctrl_get_firmware(c),
@@ -4882,10 +4883,11 @@ static void stdout_detailed_list(nvme_root_t r)
strset_iterate(&res.subsystems, stdout_detailed_subsys, &res);
printf("\n");
- printf("%-8s %-20s %-40s %-8s %-6s %-14s %-6s %-12s %-16s\n", "Device",
- "SN", "MN", "FR", "TxPort", "Address", "Slot", "Subsystem", "Namespaces");
- printf("%-.8s %-.20s %-.40s %-.8s %-.6s %-.14s %-.6s %-.12s %-.16s\n", dash,
- dash, dash, dash, dash, dash, dash, dash, dash);
+ printf("%-8s %-6s %-20s %-40s %-8s %-6s %-14s %-6s %-12s %-16s\n", "Device",
+ "Cntlid", "SN", "MN", "FR", "TxPort", "Address", "Slot", "Subsystem",
+ "Namespaces");
+ printf("%-.8s %-.6s %-.20s %-.40s %-.8s %-.6s %-.14s %-.6s %-.12s %-.16s\n",
+ dash, dash, dash, dash, dash, dash, dash, dash, dash, dash);
strset_iterate(&res.ctrls, stdout_detailed_ctrl, &res);
printf("\n");
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH nvme-cli] nvme-print: Print cntlid number for controller
2024-04-05 12:10 [PATCH nvme-cli] nvme-print: Print cntlid number for controller Nilay Shroff
@ 2024-04-07 21:55 ` Sagi Grimberg
2024-04-09 10:06 ` Daniel Wagner
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2024-04-07 21:55 UTC (permalink / raw)
To: Nilay Shroff, linux-nvme; +Cc: kbusch, dwagner, gjoyce
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH nvme-cli] nvme-print: Print cntlid number for controller
2024-04-05 12:10 [PATCH nvme-cli] nvme-print: Print cntlid number for controller Nilay Shroff
2024-04-07 21:55 ` Sagi Grimberg
@ 2024-04-09 10:06 ` Daniel Wagner
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Wagner @ 2024-04-09 10:06 UTC (permalink / raw)
To: linux-nvme, Nilay Shroff; +Cc: Daniel Wagner, kbusch, gjoyce
On Fri, 05 Apr 2024 17:40:36 +0530, Nilay Shroff wrote:
> Print the controller identifier number (cntlid) for the
> nvme controller. The cntlid is printed if nvme list
> verbose is specified.
>
>
Applied, thanks!
[1/1] nvme-print: Print cntlid number for controller
commit: 764b9a18d67f08f9f9cbe5302826550a3bb2d270
Best regards,
--
Daniel Wagner <dwagner@suse.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-09 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 12:10 [PATCH nvme-cli] nvme-print: Print cntlid number for controller Nilay Shroff
2024-04-07 21:55 ` Sagi Grimberg
2024-04-09 10:06 ` Daniel Wagner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox