From 270b48e58db86af27759b548d84b2f8ec0725795 Mon Sep 17 00:00:00 2001 From: Lior Weintraub Date: Mon, 24 Apr 2023 08:26:57 +0300 Subject: [PATCH] examples: fix incorrect controller status in MI info output In the mi-mctp example, we're incorrectly reporting the percent drive life used as the controller status. Fix the controller status output to use the correct (ccs) field. Signed-off-by: Lior Weintraub Reviewed-by: Jeremy Kerr --- examples/mi-mctp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mi-mctp.c b/examples/mi-mctp.c index c9a38523..80192491 100644 --- a/examples/mi-mctp.c +++ b/examples/mi-mctp.c @@ -113,7 +113,7 @@ int do_info(nvme_mi_ep_t ep) printf(" smart warnings: 0x%x\n", ss_health.sw); printf(" composite temp: %d\n", ss_health.ctemp); printf(" drive life used: %d%%\n", ss_health.pdlu); - printf(" controller status: 0x%04x\n", le16_to_cpu(ss_health.pdlu)); + printf(" controller status: 0x%04x\n", le16_to_cpu(ss_health.ccs)); return 0; } -- 2.49.0