Skip to contentSkip to conversation

util: fix dimm health alarm trip reporting

PATCH In review Brian Boylston 2 participants 2 messages Sep 8, 2016 libnvdimm: non-volatile memory device

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 util: fix dimm health alarm trip reporting

Use ndctl_cmd_smart_get_alarm_flags() instead of ndctl_cmd_smart_get_spares() to populate "alarm_temperature" and "alarm_spares".

---
 ndctl/util/json-smart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ndctl/util/json-smart.c +1 -1
index 824c51e..94519da 100644
@@ -120,7 +120,7 @@ struct json_object *util_dimm_health_to_json(struct ndctl_dimm *dimm)
 	}
 
 	if (flags & ND_SMART_ALARM_VALID) {
-		unsigned int alarm_flags = ndctl_cmd_smart_get_spares(cmd);
+		unsigned int alarm_flags = ndctl_cmd_smart_get_alarm_flags(cmd);
 		bool temp_flag = !!(alarm_flags & ND_SMART_TEMP_TRIP);
 		bool spares_flag = !!(alarm_flags & ND_SMART_SPARE_TRIP);
 
Signature · 6 lines
2.8.3

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm