Add upstream patch fixing parsing of passive targets

This commit is contained in:
Benjamin Berg 2021-02-02 14:12:52 +01:00
parent a1d11b7cbe
commit b063143252
2 changed files with 22 additions and 1 deletions

16
issue_291.diff Normal file
View File

@ -0,0 +1,16 @@
diff --git a/src/thd_engine_adaptive.cpp b/src/thd_engine_adaptive.cpp
index 1464006..c0ab87e 100644
--- a/src/thd_engine_adaptive.cpp
+++ b/src/thd_engine_adaptive.cpp
@@ -1190,9 +1190,9 @@ int cthd_engine_adaptive::install_passive(struct psv *psv) {
int target_state = 0;
if (psv->limit.length()) {
- if (psv->limit == "MAX") {
+ if (psv->limit == "MAX" || psv->limit == "max" ) {
target_state = TRIP_PT_INVALID_TARGET_STATE;
- } else if (psv->limit == "MIN") {
+ } else if (psv->limit == "MIN" || psv->limit == "min") {
target_state = 0;
} else {
std::istringstream buffer(psv->limit);

View File

@ -8,7 +8,7 @@
Name: thermald
Version: 2.4.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Thermal Management daemon
License: GPLv2+
@ -37,6 +37,8 @@ Requires(pre): shadow-utils
%{?systemd_requires}
Patch01: issue_291.diff
%description
%{name} monitors and controls platform temperature.
@ -243,6 +245,9 @@ exit 0
%changelog
* Tue Feb 02 2021 Benjamin Berg <bberg@redhat.com> - 2.4.1-3
- Add upstream patch fixing parsing of passive targets
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild