In version v53 libndctl gained smart support and the 'get_temperature' helper that retrieved media temperature. In v59 libndctl gained threshold support, and the 'get_temperature_threshold' helper. The implementation of 'set_temperature_threshold' was inadvertently omitted from v59. Add a definition so that applications that use the declared symbol can build.
Reported-by: Dariusz Dokupil <[email protected]> Signed-off-by: Dan Williams <[email protected]> --- ndctl/lib/smart.c | 6 ++++++ test/libndctl.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ndctl/lib/smart.c b/ndctl/lib/smart.c index 4ab94bb780cf..b76a4de1db62 100644 --- a/ndctl/lib/smart.c +++ b/ndctl/lib/smart.c @@ -117,6 +117,12 @@ smart_cmd_set_op(smart_threshold_set_media_temperature) smart_cmd_set_op(smart_threshold_set_ctrl_temperature) smart_cmd_set_op(smart_threshold_set_spares) +NDCTL_EXPORT int ndctl_cmd_smart_threshold_set_temperature( + struct ndctl_cmd *cmd, unsigned int val) +{ + return ndctl_cmd_smart_threshold_set_media_temperature(cmd, val); +} + NDCTL_EXPORT struct ndctl_cmd *ndctl_dimm_cmd_new_smart_inject( struct ndctl_dimm *dimm) { diff --git a/test/libndctl.c b/test/libndctl.c index 7fecfe2e804b..a66bcb7dfe87 100644 --- a/test/libndctl.c +++ b/test/libndctl.c @@ -2297,7 +2297,8 @@ static int check_smart_threshold(struct ndctl_bus *bus, struct ndctl_dimm *dimm, */ rc = ndctl_cmd_smart_threshold_set_alarm_control(cmd_set, ndctl_cmd_smart_threshold_get_supported_alarms(cmd_set)); - rc |= ndctl_cmd_smart_threshold_set_media_temperature(cmd_set, + /* 'set_temperature' and 'set_media_temperature' are aliases */ + rc |= ndctl_cmd_smart_threshold_set_temperature(cmd_set, ndctl_cmd_smart_get_media_temperature(cmd_smart)); rc |= ndctl_cmd_smart_threshold_set_ctrl_temperature(cmd_set, ndctl_cmd_smart_get_ctrl_temperature(cmd_smart)); _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
