[PATCH] fan: add cooling_device# to error messages

Alex Hung alex.hung at canonical.com
Fri Apr 13 18:18:14 UTC 2018


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/acpi/fan/fan.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c
index f558935..f6e9399 100644
--- a/src/acpi/fan/fan.c
+++ b/src/acpi/fan/fan.c
@@ -148,13 +148,16 @@ static int fan_test1(fwts_framework *fw)
 		fan_info *info = fwts_list_data(fan_info *, item);
 		if (info->type == NULL)
 			fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanType",
-				"Fan present but has no fan type present.");
+				"Fan %s present but has no fan type present.",
+				info->name);
 		if (info->max_state == -1)
 			fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanMaxState",
-				"Fan present but has no max_state present.");
+				"Fan %s present but has no max_state present.",
+				info->name);
 		if (info->cur_state == -1)
 			fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoFanCurState",
-				"Fan present but has no cur_state present.");
+				"Fan %s present but has no cur_state present.",
+				info->name);
 
 		if (info->type &&
 		    (info->max_state >= 0) && (info->cur_state >= 0))
-- 
2.7.4




More information about the fwts-devel mailing list