open-hpi / openhpi

Other
6 stars 10 forks source link

saHpiSensorThresholdsSet may set Thresholds even if not supported #2745

Closed mohandev2 closed 5 years ago

mohandev2 commented 5 years ago

A pull request ( #2744 ) was created by Yi Zhao yi.zhao@windriver.com and yanjun.zhu yanjun.zhu@windriver.com which fixes a problem. The problem was described as In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will be set even if TH.IsSupported == SAHPI_FALSE.

This was tested using simulator plugin. The pull request fixes the issue. Since there was no issue raised for the pull request, this issue is being raised. This may be related to an old issue ( #1501 ) which is still open and a closed issue ( #1449 )

mohandev2 commented 5 years ago

e4631e8 commit closed the issue