From 4da091bd97c6970cd106dc66897de57e5d2a814f Mon Sep 17 00:00:00 2001 From: Keith Busch Date: Thu, 11 Jun 2020 05:19:23 +0900 Subject: [PATCH] fix id-ctrl power printa Link: https://github.com/linux-nvme/nvme-cli/issues/735 Signed-off-by: Keith Busch --- nvme-print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvme-print.c b/nvme-print.c index 5ddd8e0f..30fca29d 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -2667,7 +2667,7 @@ static void print_ps_power_and_scale(__le16 ctr_power, __u8 scale) case 2: /* Units of 0.01W */ - printf("%01u.%02uW", power / 100, scale % 100); + printf("%01u.%02uW", power / 100, power % 100); break; default: -- 2.50.1