New upstream release (#1505144)
This commit is contained in:
parent
48d9b933ee
commit
8e40cdc099
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (thermald-1.6.tar.gz) = ddcd01dcd2f6b5666ffa16ba635734e4c146244b5df7c3f0deb8120f8ee7ebf1f4ee302d49db2b7e9a4950045650922977bd40bf6b38ccea9896f81e06df1d49
|
||||
SHA512 (thermald-1.7.1.tar.gz) = a78f8aa9ef0f3e3b57fc1ebbd7ad7e67985676ad7adf5b6a6d23e4aed4e2ccb8273fb67ccd9a2133f91f7f6b19f793c9ba68e41208aabde4248ca666061fe5e0
|
||||
|
@ -1,100 +0,0 @@
|
||||
From 93e52afc389c98880b91d61cf47c0603f4654ccd Mon Sep 17 00:00:00 2001
|
||||
From: lambdadroid <lambdadroid@gmail.com>
|
||||
Date: Tue, 6 Jun 2017 15:39:42 +0200
|
||||
Subject: [PATCH] Android: Fix build file
|
||||
|
||||
Android.mk was missing several source files, causing compile
|
||||
errors. Also removed some unneeded explicit include directories.
|
||||
---
|
||||
Android.mk | 73 ++++++++++++++++++++++++++++----------------------------------
|
||||
1 file changed, 33 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index 8ef9cf3..1a40bda 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -2,51 +2,44 @@ LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
-thermald_src_path := ./src
|
||||
-thermald_src_files := \
|
||||
- $(thermald_src_path)/android_main.cpp \
|
||||
- $(thermald_src_path)/thd_engine.cpp \
|
||||
- $(thermald_src_path)/thd_cdev.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_therm_sys_fs.cpp \
|
||||
- $(thermald_src_path)/thd_engine_default.cpp \
|
||||
- $(thermald_src_path)/thd_sys_fs.cpp \
|
||||
- $(thermald_src_path)/thd_trip_point.cpp \
|
||||
- $(thermald_src_path)/thd_zone.cpp \
|
||||
- $(thermald_src_path)/thd_zone_surface.cpp \
|
||||
- $(thermald_src_path)/thd_zone_cpu.cpp \
|
||||
- $(thermald_src_path)/thd_zone_therm_sys_fs.cpp \
|
||||
- $(thermald_src_path)/thd_preference.cpp \
|
||||
- $(thermald_src_path)/thd_model.cpp \
|
||||
- $(thermald_src_path)/thd_parse.cpp \
|
||||
- $(thermald_src_path)/thd_sensor.cpp \
|
||||
- $(thermald_src_path)/thd_sensor_virtual.cpp \
|
||||
- $(thermald_src_path)/thd_kobj_uevent.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_order_parser.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_gen_sysfs.cpp \
|
||||
- $(thermald_src_path)/thd_pid.cpp \
|
||||
- $(thermald_src_path)/thd_zone_generic.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_cpufreq.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_rapl.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_intel_pstate_driver.cpp \
|
||||
- $(thermald_src_path)/thd_msr.cpp \
|
||||
- $(thermald_src_path)/thd_rapl_interface.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_msr_rapl.cpp \
|
||||
- $(thermald_src_path)/thd_rapl_power_meter.cpp \
|
||||
- $(thermald_src_path)/thd_trt_art_reader.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_rapl_dram.cpp \
|
||||
- $(thermald_src_path)/thd_cpu_default_binding.cpp \
|
||||
- $(thermald_src_path)/thd_cdev_backlight.cpp
|
||||
+LOCAL_SRC_FILES := \
|
||||
+ src/android_main.cpp \
|
||||
+ src/thd_engine.cpp \
|
||||
+ src/thd_cdev.cpp \
|
||||
+ src/thd_cdev_therm_sys_fs.cpp \
|
||||
+ src/thd_engine_default.cpp \
|
||||
+ src/thd_sys_fs.cpp \
|
||||
+ src/thd_trip_point.cpp \
|
||||
+ src/thd_zone.cpp \
|
||||
+ src/thd_zone_surface.cpp \
|
||||
+ src/thd_zone_cpu.cpp \
|
||||
+ src/thd_zone_therm_sys_fs.cpp \
|
||||
+ src/thd_zone_dynamic.cpp \
|
||||
+ src/thd_preference.cpp \
|
||||
+ src/thd_model.cpp \
|
||||
+ src/thd_parse.cpp \
|
||||
+ src/thd_sensor.cpp \
|
||||
+ src/thd_sensor_virtual.cpp \
|
||||
+ src/thd_kobj_uevent.cpp \
|
||||
+ src/thd_cdev_order_parser.cpp \
|
||||
+ src/thd_cdev_gen_sysfs.cpp \
|
||||
+ src/thd_pid.cpp \
|
||||
+ src/thd_zone_generic.cpp \
|
||||
+ src/thd_cdev_cpufreq.cpp \
|
||||
+ src/thd_cdev_rapl.cpp \
|
||||
+ src/thd_cdev_intel_pstate_driver.cpp \
|
||||
+ src/thd_rapl_power_meter.cpp \
|
||||
+ src/thd_trt_art_reader.cpp \
|
||||
+ src/thd_cdev_rapl_dram.cpp \
|
||||
+ src/thd_cpu_default_binding.cpp \
|
||||
+ src/thd_cdev_backlight.cpp
|
||||
|
||||
-LOCAL_C_INCLUDES += $(LOCAL_PATH) $(thermald_src_path) \
|
||||
- external/icu4c/common \
|
||||
- external/libxml2/include \
|
||||
- system/core/include/
|
||||
+LOCAL_C_INCLUDES += external/libxml2/include
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
-LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"'
|
||||
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter
|
||||
LOCAL_STATIC_LIBRARIES := libxml2
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
-LOCAL_SRC_FILES := $(thermald_src_files)
|
||||
LOCAL_MODULE := thermal-daemon
|
||||
include $(BUILD_EXECUTABLE)
|
@ -1,78 +0,0 @@
|
||||
From bcbb8ea8e6ced976d4359db9bc4c35a9d8f345ba Mon Sep 17 00:00:00 2001
|
||||
From: lambdadroid <lambdadroid@gmail.com>
|
||||
Date: Tue, 6 Jun 2017 15:56:37 +0200
|
||||
Subject: [PATCH] Android: Fix compile errors
|
||||
|
||||
Android doesn't have DBUS so all functionality related to it
|
||||
must be disabled by checking if GLIB_SUPPORT is defined.
|
||||
|
||||
Currently, the build also fails with the following error:
|
||||
thd_trip_point.h:139:2: error: control may reach end of non-void function
|
||||
|
||||
This is because the exception is excluded for Android, and nothing is
|
||||
returned if an invalid index is given into the method.
|
||||
|
||||
The easiest way to fix this is to exclude the method entirely for
|
||||
Android. The method is only used from DBUS code so it doesn't
|
||||
cause any problems if Android doesn't have it.
|
||||
---
|
||||
src/thd_engine_default.cpp | 9 +++++++--
|
||||
src/thd_trip_point.h | 4 ++--
|
||||
2 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/thd_engine_default.cpp b/src/thd_engine_default.cpp
|
||||
index ef0b588..0d4c55c 100644
|
||||
--- a/src/thd_engine_default.cpp
|
||||
+++ b/src/thd_engine_default.cpp
|
||||
@@ -36,7 +36,10 @@
|
||||
#include "thd_cdev_rapl_dram.h"
|
||||
#include "thd_sensor_virtual.h"
|
||||
#include "thd_cdev_backlight.h"
|
||||
+
|
||||
+#ifdef GLIB_SUPPORT
|
||||
#include "thd_cdev_modem.h"
|
||||
+#endif
|
||||
|
||||
// Default CPU cooling devices, which are not part of thermal sysfs
|
||||
// Since non trivial initialization is not supported, we init all fields even if they are not needed
|
||||
@@ -502,7 +505,8 @@ int cthd_engine_default::add_replace_cdev(cooling_dev_t *config) {
|
||||
}
|
||||
if (!cdev_present) {
|
||||
// create new
|
||||
- if (config->type_string.compare("intel_modem") == 0)
|
||||
+ if (config->type_string.compare("intel_modem") == 0) {
|
||||
+#ifdef GLIB_SUPPORT
|
||||
/*
|
||||
* Add Modem as cdev
|
||||
* intel_modem is a modem identifier across all intel platforms.
|
||||
@@ -510,7 +514,8 @@ int cthd_engine_default::add_replace_cdev(cooling_dev_t *config) {
|
||||
* are to be taken care in the cdev implementation.
|
||||
*/
|
||||
cdev = new cthd_cdev_modem(current_cdev_index, config->path_str);
|
||||
- else
|
||||
+#endif
|
||||
+ } else
|
||||
cdev = new cthd_gen_sysfs_cdev(current_cdev_index, config->path_str);
|
||||
if (!cdev)
|
||||
return THD_ERROR;
|
||||
diff --git a/src/thd_trip_point.h b/src/thd_trip_point.h
|
||||
index 746f82f..7981d58 100644
|
||||
--- a/src/thd_trip_point.h
|
||||
+++ b/src/thd_trip_point.h
|
||||
@@ -129,14 +129,14 @@ class cthd_trip_point {
|
||||
return cdevs.size();
|
||||
}
|
||||
|
||||
+#ifndef ANDROID
|
||||
trip_pt_cdev_t &get_cdev_at_index(unsigned int index) {
|
||||
if (index < cdevs.size())
|
||||
return cdevs[index];
|
||||
-#ifndef ANDROID
|
||||
else
|
||||
throw std::invalid_argument("index");
|
||||
-#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
void trip_cdev_add(trip_pt_cdev_t trip_cdev) {
|
||||
int index;
|
@ -1,39 +0,0 @@
|
||||
From 8e76666785f732aa2c70c626b242cffd566ea434 Mon Sep 17 00:00:00 2001
|
||||
From: James Ye <lolz836@gmail.com>
|
||||
Date: Mon, 3 Apr 2017 12:33:15 +1000
|
||||
Subject: [PATCH] distribution_integration: update RPM .spec for 1.6
|
||||
|
||||
- fix inconsistent indents
|
||||
---
|
||||
distribution_integration/thermal-daemon.spec | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/distribution_integration/thermal-daemon.spec b/distribution_integration/thermal-daemon.spec
|
||||
index d452438..5d24563 100644
|
||||
--- a/distribution_integration/thermal-daemon.spec
|
||||
+++ b/distribution_integration/thermal-daemon.spec
|
||||
@@ -1,12 +1,12 @@
|
||||
Name: thermald
|
||||
-Version: 1.5
|
||||
-Release: 4%{?dist}
|
||||
+Version: 1.6
|
||||
+Release: 1%{?dist}
|
||||
Summary: The "Linux Thermal Daemon" program from 01.org
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://github.com/01org/thermal_daemon
|
||||
%global pkgname thermal_daemon
|
||||
-Source0: https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz
|
||||
+Source0: https://github.com/01org/thermal_daemon/archive/v%{version}.tar.gz
|
||||
|
||||
BuildRequires: automake
|
||||
BuildRequires: autoconf
|
||||
@@ -57,6 +57,8 @@ make %{?_smp_mflags}
|
||||
%exclude %{_sysconfdir}/init
|
||||
|
||||
%changelog
|
||||
+* Mon Apr 03 2017 James Ye <jye836@gmail.com> 1.6-1
|
||||
+- Updated to thermal daemon 1.6
|
||||
* Tue Oct 25 2016 Michael P. Moran <> 1.5-4
|
||||
- Updated spec file for version 1.5.4
|
||||
* Tue Mar 29 2016 Alexey Slaykovsky <alexey@slaykovsky.com> 1.5-3
|
@ -1,37 +0,0 @@
|
||||
From 18989faac5138213a99f63346e49f4279caad9fb Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Thu, 20 Apr 2017 18:40:47 +0100
|
||||
Subject: [PATCH] Don't terminate the thermald engine if thd_engine is null
|
||||
|
||||
It is possible for a signal to occur before the thermald engine
|
||||
is up and running and hence trying to call the terminate method
|
||||
will result in a segmentation fault. Check to see if thd_engine
|
||||
is non-null before invoking thd_engine_terminate.
|
||||
|
||||
Fixes bug http://bugs.launchpad.net/bugs/1677427
|
||||
|
||||
Note: I was able to reproduce the bug by inserting a
|
||||
kill(getpid(), SIGTERM) after the signal handler was installed
|
||||
and before the thermald engine is started to reliably trip the
|
||||
issue. There is just a very small window where this bug can
|
||||
actually can occur.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/main.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 14bd912..36abe7b 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -137,7 +137,8 @@ bool check_thermald_running() {
|
||||
|
||||
// SIGTERM & SIGINT handler
|
||||
void sig_int_handler(int signum) {
|
||||
- thd_engine->thd_engine_terminate();
|
||||
+ if (thd_engine)
|
||||
+ thd_engine->thd_engine_terminate();
|
||||
sleep(1);
|
||||
if (g_main_loop)
|
||||
g_main_loop_quit(g_main_loop);
|
@ -1,30 +0,0 @@
|
||||
From 6a2344b4a55acc0cba356d0f7c521c0cdb6632e0 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Mon, 13 Mar 2017 16:40:42 +0000
|
||||
Subject: [PATCH] Fix build warning on i386 architecture builds
|
||||
|
||||
print out size as size_t type, use %zu format specifier to
|
||||
fix build warning on 32 bit i386:
|
||||
|
||||
/usr/include/glib-2.0/glib/gmessages.h:342:43: warning: format '%lu'
|
||||
expects argument of type 'long unsigned int', but argument 4 has
|
||||
type 'std::vector<zone_trip_limits_t>::size_type {aka unsigned int}'
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/thd_cdev.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/thd_cdev.cpp b/src/thd_cdev.cpp
|
||||
index 6ee09ee..4850860 100644
|
||||
--- a/src/thd_cdev.cpp
|
||||
+++ b/src/thd_cdev.cpp
|
||||
@@ -199,7 +199,7 @@ int cthd_cdev::thd_cdev_set_state(int set_point, int target_temp,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
- thd_log_debug("zone_trip_limits.size() %lu\n", zone_trip_limits.size());
|
||||
+ thd_log_debug("zone_trip_limits.size() %zu\n", (size_t)zone_trip_limits.size());
|
||||
if (zone_trip_limits.size() > 0) {
|
||||
int length = zone_trip_limits.size();
|
||||
int _target_value = TRIP_PT_INVALID_TARGET_STATE;
|
@ -1,40 +0,0 @@
|
||||
From 9c5d8354dd8efff340a030c05f7beda03061cd0a Mon Sep 17 00:00:00 2001
|
||||
From: testuser <testuser>
|
||||
Date: Thu, 29 Jun 2017 17:24:51 -0700
|
||||
Subject: [PATCH] Fix dbus re-init accessing deleted pointer
|
||||
|
||||
As Colin King found, there is issue during reinit.
|
||||
thd_engine is deleted and then getting accessed.
|
||||
So store the parameters before deleting the thd_engine.
|
||||
---
|
||||
src/thd_dbus_interface.cpp | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/thd_dbus_interface.cpp b/src/thd_dbus_interface.cpp
|
||||
index b8e4ab0..6d0265d 100644
|
||||
--- a/src/thd_dbus_interface.cpp
|
||||
+++ b/src/thd_dbus_interface.cpp
|
||||
@@ -199,10 +199,6 @@ gboolean thd_dbus_interface_terminate(PrefObject *obj, GError **error) {
|
||||
gboolean thd_dbus_interface_reinit(PrefObject *obj, GError **error) {
|
||||
bool exclusive_control = false;
|
||||
|
||||
- thd_engine->thd_engine_terminate();
|
||||
- sleep(1);
|
||||
- delete thd_engine;
|
||||
- sleep(2);
|
||||
if (thd_engine->get_control_mode() == EXCLUSIVE)
|
||||
exclusive_control = true;
|
||||
|
||||
@@ -211,6 +207,12 @@ gboolean thd_dbus_interface_reinit(PrefObject *obj, GError **error) {
|
||||
if (!config_file.empty())
|
||||
conf_file = config_file.c_str();
|
||||
|
||||
+ thd_engine->thd_engine_terminate();
|
||||
+ sleep(1);
|
||||
+ delete thd_engine;
|
||||
+ sleep(2);
|
||||
+
|
||||
+
|
||||
if (thd_engine_create_default_engine(true, exclusive_control,
|
||||
conf_file) != THD_SUCCESS) {
|
||||
return FALSE;
|
@ -1,69 +0,0 @@
|
||||
From 8f7d49be960dd19edaef452a89b541e4509caef7 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Tue, 18 Apr 2017 17:16:09 +0100
|
||||
Subject: [PATCH] fix typo on field name default_prefernce
|
||||
|
||||
Fix typo, default_prefernce should be default_preference
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/thd_parse.cpp | 10 +++++-----
|
||||
src/thd_parse.h | 2 +-
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/thd_parse.cpp b/src/thd_parse.cpp
|
||||
index e96f9d0..b2828d1 100644
|
||||
--- a/src/thd_parse.cpp
|
||||
+++ b/src/thd_parse.cpp
|
||||
@@ -467,7 +467,7 @@ int cthd_parse::parse_new_platform_info(xmlNode * a_node, xmlDoc *doc,
|
||||
xmlNode *cur_node = NULL;
|
||||
char *tmp_value;
|
||||
|
||||
- info_ptr->default_prefernce = PREF_ENERGY_CONSERVE;
|
||||
+ info_ptr->default_preference = PREF_ENERGY_CONSERVE;
|
||||
|
||||
for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
|
||||
if (cur_node->type == XML_ELEMENT_NODE) {
|
||||
@@ -488,9 +488,9 @@ int cthd_parse::parse_new_platform_info(xmlNode * a_node, xmlDoc *doc,
|
||||
"Preference")) {
|
||||
char *pref_val = char_trim(tmp_value);
|
||||
if (pref_val && !strcasecmp(pref_val, "PERFORMANCE"))
|
||||
- info_ptr->default_prefernce = PREF_PERFORMANCE;
|
||||
+ info_ptr->default_preference = PREF_PERFORMANCE;
|
||||
else
|
||||
- info_ptr->default_prefernce = PREF_ENERGY_CONSERVE;
|
||||
+ info_ptr->default_preference = PREF_ENERGY_CONSERVE;
|
||||
} else if (!strcasecmp((const char*) cur_node->name,
|
||||
"ThermalZones")) {
|
||||
parse_thermal_zones(cur_node->children, doc, info_ptr);
|
||||
@@ -592,7 +592,7 @@ void cthd_parse::dump_thermal_conf() {
|
||||
thd_log_info(" *** Index %u ***\n", i);
|
||||
thd_log_info("Name: %s\n", thermal_info_list[i].name.c_str());
|
||||
thd_log_info("UUID: %s\n", thermal_info_list[i].uuid.c_str());
|
||||
- thd_log_info("type: %d\n", thermal_info_list[i].default_prefernce);
|
||||
+ thd_log_info("type: %d\n", thermal_info_list[i].default_preference);
|
||||
|
||||
for (unsigned int j = 0; j < thermal_info_list[i].sensors.size(); ++j) {
|
||||
thd_log_info("\tSensor %u \n", j);
|
||||
@@ -807,7 +807,7 @@ int cthd_parse::set_default_preference() {
|
||||
cthd_preference thd_pref;
|
||||
int ret;
|
||||
|
||||
- if (thermal_info_list[matched_thermal_info_index].default_prefernce
|
||||
+ if (thermal_info_list[matched_thermal_info_index].default_preference
|
||||
== PREF_PERFORMANCE)
|
||||
ret = thd_pref.set_preference("PERFORMANCE");
|
||||
else
|
||||
diff --git a/src/thd_parse.h b/src/thd_parse.h
|
||||
index 3b19a8e..6d7e890 100644
|
||||
--- a/src/thd_parse.h
|
||||
+++ b/src/thd_parse.h
|
||||
@@ -115,7 +115,7 @@ typedef struct {
|
||||
std::string name;
|
||||
std::string uuid;
|
||||
std::string product_name;
|
||||
- int default_prefernce;
|
||||
+ int default_preference;
|
||||
std::vector<thermal_sensor_t> sensors;
|
||||
std::vector<thermal_zone_t> zones;
|
||||
std::vector<cooling_dev_t> cooling_devs;
|
@ -1,23 +0,0 @@
|
||||
From 18d6ca75bbc504aaf9fe862dc1c10c3c65fbe7bd Mon Sep 17 00:00:00 2001
|
||||
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
|
||||
Date: Fri, 30 Jun 2017 10:23:48 -0700
|
||||
Subject: [PATCH] Initialize lowest_valid_index to prevent SEGV
|
||||
|
||||
Chris Murphy reported ThermalMonitor crash by signal 11.
|
||||
Fix this by initializing lowest_valid_index to 0.
|
||||
---
|
||||
tools/thermal_monitor/thermaldinterface.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/thermal_monitor/thermaldinterface.cpp b/tools/thermal_monitor/thermaldinterface.cpp
|
||||
index eca8d74..e73b7a5 100644
|
||||
--- a/tools/thermal_monitor/thermaldinterface.cpp
|
||||
+++ b/tools/thermal_monitor/thermaldinterface.cpp
|
||||
@@ -453,6 +453,7 @@ int ThermaldInterface::getZoneInformation(uint index, zoneInformationType &info)
|
||||
info.name = result.arguments().at(0).toString();
|
||||
info.sensor_count = result.arguments().at(1).toInt();
|
||||
info.trip_count = result.arguments().at(2).toInt();
|
||||
+ info.lowest_valid_index = 0;
|
||||
return 0;
|
||||
} else {
|
||||
qCritical() << "error from" << iface->interface() << result.errorMessage();
|
@ -1,35 +0,0 @@
|
||||
From 98d1201a0931f5ba3f9cf672b1137bfef17e4085 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
|
||||
Date: Thu, 25 Dec 2014 20:28:49 +0100
|
||||
Subject: [PATCH] Load the preference value provided by the xml file The
|
||||
preference value was just parsed by phd_parser.cpp but not forwarded to the
|
||||
engine. Check if the platform matched the id given by the xml file before
|
||||
apllying the preference value
|
||||
|
||||
---
|
||||
src/thd_engine.cpp | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
|
||||
index e4a4ef1..8927f79 100644
|
||||
--- a/src/thd_engine.cpp
|
||||
+++ b/src/thd_engine.cpp
|
||||
@@ -235,6 +235,10 @@ int cthd_engine::thd_engine_start(bool ignore_cpuid_check) {
|
||||
return THD_FATAL_ERROR;
|
||||
}
|
||||
|
||||
+ if (parser.platform_matched()) {
|
||||
+ parser.set_default_preference();
|
||||
+ }
|
||||
+
|
||||
// Check if polling is disabled and sensors don't support
|
||||
// async mode, in that enable force polling
|
||||
if (!poll_interval_sec) {
|
||||
@@ -299,6 +303,7 @@ int cthd_engine::thd_engine_start(bool ignore_cpuid_check) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+ thd_pref.refresh();
|
||||
preference = thd_pref.get_preference();
|
||||
thd_log_info("Current user preference is %d\n", preference);
|
||||
|
@ -1,25 +0,0 @@
|
||||
From e311dc88d3acac7eca593efea5d95507b02608da Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Thu, 13 Apr 2017 12:03:53 +0100
|
||||
Subject: [PATCH] remove duplicate assignment to critical_temp
|
||||
|
||||
critical_temp is being assigned to zero twice, remove one of them
|
||||
as it is redundant.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/thd_zone_cpu.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/thd_zone_cpu.cpp b/src/thd_zone_cpu.cpp
|
||||
index b6da9bf..051cbf8 100644
|
||||
--- a/src/thd_zone_cpu.cpp
|
||||
+++ b/src/thd_zone_cpu.cpp
|
||||
@@ -51,7 +51,6 @@ cthd_zone_cpu::cthd_zone_cpu(int index, std::string path, int package_id) :
|
||||
}
|
||||
|
||||
int cthd_zone_cpu::init() {
|
||||
- critical_temp = 0;
|
||||
int temp = 0;
|
||||
bool found = false;
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 90169f80a70efd4d5b6101e87666cd355dbd786f Mon Sep 17 00:00:00 2001
|
||||
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
|
||||
Date: Fri, 2 Jun 2017 08:04:57 -0700
|
||||
Subject: [PATCH] Removed compile flags
|
||||
|
||||
Removed -fpermissive and -fopenmp.
|
||||
---
|
||||
Android.mk | 2 +-
|
||||
Makefile.am | 2 --
|
||||
2 files changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index 092053d..8ef9cf3 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -43,7 +43,7 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) $(thermald_src_path) \
|
||||
system/core/include/
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
-LOCAL_CFLAGS := -fpermissive -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"'
|
||||
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"'
|
||||
LOCAL_STATIC_LIBRARIES := libxml2
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 1ac26ed..ee96893 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -11,8 +11,6 @@ AM_CXXFLAGS = ${DBUS_CFLAGS}\
|
||||
-DTDRUNDIR=\"$(tdrundir)\" \
|
||||
-DTDCONFDIR=\"$(tdconfdir)\" \
|
||||
-I src \
|
||||
- -fpermissive \
|
||||
- -fopenmp \
|
||||
-Wreorder \
|
||||
-Wsign-compare \
|
||||
-Wreturn-type \
|
@ -1,24 +0,0 @@
|
||||
From 37a25879239466f2d096fd1a58b2ac7bbc3958f5 Mon Sep 17 00:00:00 2001
|
||||
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
|
||||
Date: Mon, 27 Mar 2017 17:39:30 -0700
|
||||
Subject: [PATCH] set default preference
|
||||
|
||||
In case there is missing element for preference, set ENERGY_CONSERVE
|
||||
as default.
|
||||
---
|
||||
src/thd_parse.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/thd_parse.cpp b/src/thd_parse.cpp
|
||||
index f73d43e..f5e0870 100644
|
||||
--- a/src/thd_parse.cpp
|
||||
+++ b/src/thd_parse.cpp
|
||||
@@ -462,6 +462,8 @@ int cthd_parse::parse_new_platform_info(xmlNode * a_node, xmlDoc *doc,
|
||||
xmlNode *cur_node = NULL;
|
||||
char *tmp_value;
|
||||
|
||||
+ info_ptr->default_prefernce = PREF_ENERGY_CONSERVE;
|
||||
+
|
||||
for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
|
||||
if (cur_node->type == XML_ELEMENT_NODE) {
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
@ -1,102 +0,0 @@
|
||||
From 783525be485838dd5a2884c1b2f33c5cebdadd1a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||
Date: Sat, 1 Jul 2017 10:14:14 +0200
|
||||
Subject: [PATCH 1/3] Fix warning: 'bool trip_sort' defined but not used
|
||||
[-Wunused-function]
|
||||
|
||||
---
|
||||
src/thd_trip_point.h | 4 ----
|
||||
src/thd_zone.cpp | 4 ++++
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/thd_trip_point.h b/src/thd_trip_point.h
|
||||
index 7981d58..cf24d15 100644
|
||||
--- a/src/thd_trip_point.h
|
||||
+++ b/src/thd_trip_point.h
|
||||
@@ -171,8 +171,4 @@ class cthd_trip_point {
|
||||
}
|
||||
}
|
||||
};
|
||||
-
|
||||
-static bool trip_sort(cthd_trip_point trip1, cthd_trip_point trip2) {
|
||||
- return (trip1.get_trip_temp() < trip2.get_trip_temp());
|
||||
-}
|
||||
#endif
|
||||
diff --git a/src/thd_zone.cpp b/src/thd_zone.cpp
|
||||
index 9f327fd..31dd3ea 100644
|
||||
--- a/src/thd_zone.cpp
|
||||
+++ b/src/thd_zone.cpp
|
||||
@@ -34,6 +34,10 @@
|
||||
#include "thd_zone.h"
|
||||
#include "thd_engine.h"
|
||||
|
||||
+static bool trip_sort(cthd_trip_point trip1, cthd_trip_point trip2) {
|
||||
+ return (trip1.get_trip_temp() < trip2.get_trip_temp());
|
||||
+}
|
||||
+
|
||||
cthd_zone::cthd_zone(int _index, std::string control_path, sensor_relate_t rel) :
|
||||
index(_index), zone_sysfs(control_path.c_str()), zone_temp(0), zone_active(
|
||||
false), zone_cdev_binded_status(false), type_str(), sensor_rel(
|
||||
|
||||
From 6384069b9373d87dba64d12aab1a782c498eff67 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||
Date: Sat, 1 Jul 2017 10:20:25 +0200
|
||||
Subject: [PATCH 2/3] Fix warning: unused variable 'enabled'
|
||||
[-Wunused-variable]
|
||||
|
||||
---
|
||||
src/thd_cdev_modem.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/thd_cdev_modem.cpp b/src/thd_cdev_modem.cpp
|
||||
index a56e8e1..b466da5 100644
|
||||
--- a/src/thd_cdev_modem.cpp
|
||||
+++ b/src/thd_cdev_modem.cpp
|
||||
@@ -173,7 +173,6 @@ int cthd_cdev_modem::get_modem_property(DBusConnection* conn,
|
||||
DBusMessageIter key, var;
|
||||
|
||||
char *property_name;
|
||||
- dbus_bool_t enabled;
|
||||
|
||||
dbus_message_iter_recurse(&dict, &key);
|
||||
|
||||
|
||||
From 9250e90645215001ba2171ef2770723c47e13d79 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
||||
Date: Sat, 1 Jul 2017 10:23:21 +0200
|
||||
Subject: [PATCH 3/3] Enable -Werror to keep code clean
|
||||
|
||||
---
|
||||
Android.mk | 2 +-
|
||||
Makefile.am | 5 +++--
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Android.mk b/Android.mk
|
||||
index 1a40bda..8612682 100644
|
||||
--- a/Android.mk
|
||||
+++ b/Android.mk
|
||||
@@ -37,7 +37,7 @@ LOCAL_SRC_FILES := \
|
||||
LOCAL_C_INCLUDES += external/libxml2/include
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
-LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter
|
||||
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter -Werror
|
||||
LOCAL_STATIC_LIBRARIES := libxml2
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index ee96893..e76c163 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -14,8 +14,9 @@ AM_CXXFLAGS = ${DBUS_CFLAGS}\
|
||||
-Wreorder \
|
||||
-Wsign-compare \
|
||||
-Wreturn-type \
|
||||
- -Wunused-but-set-variable\
|
||||
- -Wformat
|
||||
+ -Wunused-but-set-variable \
|
||||
+ -Wformat \
|
||||
+ -Werror
|
||||
|
||||
EXTRA_DIST=Makefile.glib \
|
||||
thermald.pc.in
|
@ -1,28 +0,0 @@
|
||||
From a8eba71a95b3b8af0540f6a93877e24bc8c47079 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Tue, 7 Mar 2017 11:47:51 +0000
|
||||
Subject: [PATCH] thd_cdev: ensure _target_value is initialized
|
||||
|
||||
This fixes an issue discovered by static analysis with
|
||||
CoverityScan.
|
||||
|
||||
CoverityScan CID#157084 ("Uninitialized scalar value")
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/thd_cdev.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/thd_cdev.cpp b/src/thd_cdev.cpp
|
||||
index 107c1d5..6ee09ee 100644
|
||||
--- a/src/thd_cdev.cpp
|
||||
+++ b/src/thd_cdev.cpp
|
||||
@@ -202,7 +202,7 @@ int cthd_cdev::thd_cdev_set_state(int set_point, int target_temp,
|
||||
thd_log_debug("zone_trip_limits.size() %lu\n", zone_trip_limits.size());
|
||||
if (zone_trip_limits.size() > 0) {
|
||||
int length = zone_trip_limits.size();
|
||||
- int _target_value;
|
||||
+ int _target_value = TRIP_PT_INVALID_TARGET_STATE;
|
||||
int i;
|
||||
|
||||
// Just remove the current zone requesting to turn off
|
@ -1,243 +0,0 @@
|
||||
From 7ee77cce542b2ed0421133b01904d5ad0ecdab6f Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Thu, 13 Apr 2017 12:27:53 +0100
|
||||
Subject: [PATCH] thd_parse: check for xmlNodeListGetString NULL returns
|
||||
|
||||
Although it is unlikely, it is possible for xmlNodeListGetString to return
|
||||
NULL, so null check the return and only parse the returned string if it
|
||||
is non-null.
|
||||
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
---
|
||||
src/thd_parse.cpp | 185 ++++++++++++++++++++++++++++--------------------------
|
||||
1 file changed, 95 insertions(+), 90 deletions(-)
|
||||
|
||||
diff --git a/src/thd_parse.cpp b/src/thd_parse.cpp
|
||||
index f5e0870..e96f9d0 100644
|
||||
--- a/src/thd_parse.cpp
|
||||
+++ b/src/thd_parse.cpp
|
||||
@@ -112,20 +112,21 @@ int cthd_parse::parse_new_trip_cdev(xmlNode * a_node, xmlDoc *doc,
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
||||
tmp_value = (char *) xmlNodeListGetString(doc,
|
||||
cur_node->xmlChildrenNode, 1);
|
||||
- if (!strcasecmp((const char*) cur_node->name, "type")) {
|
||||
- trip_cdev->type.assign((const char*) tmp_value);
|
||||
- string_trim(trip_cdev->type);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "influence")) {
|
||||
- trip_cdev->influence = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "SamplingPeriod")) {
|
||||
- trip_cdev->sampling_period = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "TargetState")) {
|
||||
- trip_cdev->target_state = atoi(tmp_value);
|
||||
- }
|
||||
- if (tmp_value)
|
||||
+ if (tmp_value) {
|
||||
+ if (!strcasecmp((const char*) cur_node->name, "type")) {
|
||||
+ trip_cdev->type.assign((const char*) tmp_value);
|
||||
+ string_trim(trip_cdev->type);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "influence")) {
|
||||
+ trip_cdev->influence = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "SamplingPeriod")) {
|
||||
+ trip_cdev->sampling_period = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "TargetState")) {
|
||||
+ trip_cdev->target_state = atoi(tmp_value);
|
||||
+ }
|
||||
xmlFree(tmp_value);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,15 +224,16 @@ int cthd_parse::parse_pid_values(xmlNode * a_node, xmlDoc *doc,
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
||||
tmp_value = (char*) xmlNodeListGetString(doc,
|
||||
cur_node->xmlChildrenNode, 1);
|
||||
- if (!strcasecmp((const char*) cur_node->name, "Kp")) {
|
||||
- pid_ptr->Kp = atof(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "Kd")) {
|
||||
- pid_ptr->Kd = atof(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "Ki")) {
|
||||
- pid_ptr->Ki = atof(tmp_value);
|
||||
- }
|
||||
- if (tmp_value)
|
||||
+ if (tmp_value) {
|
||||
+ if (!strcasecmp((const char*) cur_node->name, "Kp")) {
|
||||
+ pid_ptr->Kp = atof(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "Kd")) {
|
||||
+ pid_ptr->Kd = atof(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "Ki")) {
|
||||
+ pid_ptr->Ki = atof(tmp_value);
|
||||
+ }
|
||||
xmlFree(tmp_value);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,47 +283,48 @@ int cthd_parse::parse_new_cooling_dev(xmlNode * a_node, xmlDoc *doc,
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
||||
tmp_value = (char*) xmlNodeListGetString(doc,
|
||||
cur_node->xmlChildrenNode, 1);
|
||||
- if (!strcasecmp((const char *) cur_node->name, "Index")) {
|
||||
- cdev->index = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name, "Type")) {
|
||||
- cdev->type_string.assign((const char*) tmp_value);
|
||||
- string_trim(cdev->type_string);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name, "Path")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_PATH;
|
||||
- cdev->path_str.assign((const char*) tmp_value);
|
||||
- string_trim(cdev->path_str);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name, "MinState")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_MIN_STATE;
|
||||
- cdev->min_state = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name, "MaxState")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_MAX_STATE;
|
||||
- cdev->max_state = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name,
|
||||
- "IncDecStep")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_STEP;
|
||||
- cdev->inc_dec_step = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name, "ReadBack")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_READ_BACK;
|
||||
- cdev->read_back = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name,
|
||||
- "DebouncePeriod")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_DEBOUNCE_VAL;
|
||||
- cdev->debounce_interval = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "PidControl")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_PID_PARAMS;
|
||||
- cdev->pid_enable = true;
|
||||
- parse_pid_values(cur_node->children, doc, &cdev->pid);
|
||||
- } else if (!strcasecmp((const char *) cur_node->name,
|
||||
- "AutoOffMode")) {
|
||||
- cdev->mask |= CDEV_DEF_BIT_AUTO_DOWN;
|
||||
- if (atoi(tmp_value))
|
||||
- cdev->auto_down_control = true;
|
||||
- else
|
||||
- cdev->auto_down_control = false;
|
||||
- }
|
||||
- if (tmp_value)
|
||||
+ if (tmp_value) {
|
||||
+ if (!strcasecmp((const char *) cur_node->name, "Index")) {
|
||||
+ cdev->index = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name, "Type")) {
|
||||
+ cdev->type_string.assign((const char*) tmp_value);
|
||||
+ string_trim(cdev->type_string);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name, "Path")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_PATH;
|
||||
+ cdev->path_str.assign((const char*) tmp_value);
|
||||
+ string_trim(cdev->path_str);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name, "MinState")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_MIN_STATE;
|
||||
+ cdev->min_state = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name, "MaxState")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_MAX_STATE;
|
||||
+ cdev->max_state = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name,
|
||||
+ "IncDecStep")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_STEP;
|
||||
+ cdev->inc_dec_step = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name, "ReadBack")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_READ_BACK;
|
||||
+ cdev->read_back = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name,
|
||||
+ "DebouncePeriod")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_DEBOUNCE_VAL;
|
||||
+ cdev->debounce_interval = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "PidControl")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_PID_PARAMS;
|
||||
+ cdev->pid_enable = true;
|
||||
+ parse_pid_values(cur_node->children, doc, &cdev->pid);
|
||||
+ } else if (!strcasecmp((const char *) cur_node->name,
|
||||
+ "AutoOffMode")) {
|
||||
+ cdev->mask |= CDEV_DEF_BIT_AUTO_DOWN;
|
||||
+ if (atoi(tmp_value))
|
||||
+ cdev->auto_down_control = true;
|
||||
+ else
|
||||
+ cdev->auto_down_control = false;
|
||||
+ }
|
||||
xmlFree(tmp_value);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,17 +384,18 @@ int cthd_parse::parse_new_sensor_link(xmlNode * a_node, xmlDoc *doc,
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
||||
tmp_value = (char*) xmlNodeListGetString(doc,
|
||||
cur_node->xmlChildrenNode, 1);
|
||||
- if (!strcasecmp((const char*) cur_node->name, "SensorType")) {
|
||||
- info_ptr->name.assign(tmp_value);
|
||||
- string_trim(info_ptr->name);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "Multiplier")) {
|
||||
- info_ptr->multiplier = atof(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "Offset")) {
|
||||
- info_ptr->offset = atof(tmp_value);
|
||||
- }
|
||||
- if (tmp_value)
|
||||
+ if (tmp_value) {
|
||||
+ if (!strcasecmp((const char*) cur_node->name, "SensorType")) {
|
||||
+ info_ptr->name.assign(tmp_value);
|
||||
+ string_trim(info_ptr->name);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "Multiplier")) {
|
||||
+ info_ptr->multiplier = atof(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "Offset")) {
|
||||
+ info_ptr->offset = atof(tmp_value);
|
||||
+ }
|
||||
xmlFree(tmp_value);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,26 +412,27 @@ int cthd_parse::parse_new_sensor(xmlNode * a_node, xmlDoc *doc,
|
||||
DEBUG_PARSER_PRINT("node type: Element, name: %s value: %s\n", cur_node->name, xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1));
|
||||
tmp_value = (char*) xmlNodeListGetString(doc,
|
||||
cur_node->xmlChildrenNode, 1);
|
||||
- if (!strcasecmp((const char*) cur_node->name, "Type")) {
|
||||
- info_ptr->name.assign(tmp_value);
|
||||
- string_trim(info_ptr->name);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "Path")) {
|
||||
- info_ptr->mask |= SENSOR_DEF_BIT_PATH;
|
||||
- info_ptr->path.assign(tmp_value);
|
||||
- string_trim(info_ptr->path);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "AsyncCapable")) {
|
||||
- info_ptr->async_capable = atoi(tmp_value);
|
||||
- info_ptr->mask |= SENSOR_DEF_BIT_ASYNC_CAPABLE;
|
||||
- } else if (!strcasecmp((const char*) cur_node->name, "Virtual")) {
|
||||
- info_ptr->virtual_sensor = atoi(tmp_value);
|
||||
- } else if (!strcasecmp((const char*) cur_node->name,
|
||||
- "SensorLink")) {
|
||||
- parse_new_sensor_link(cur_node->children, doc,
|
||||
- &info_ptr->sensor_link);
|
||||
- }
|
||||
- if (tmp_value)
|
||||
+ if (tmp_value) {
|
||||
+ if (!strcasecmp((const char*) cur_node->name, "Type")) {
|
||||
+ info_ptr->name.assign(tmp_value);
|
||||
+ string_trim(info_ptr->name);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "Path")) {
|
||||
+ info_ptr->mask |= SENSOR_DEF_BIT_PATH;
|
||||
+ info_ptr->path.assign(tmp_value);
|
||||
+ string_trim(info_ptr->path);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "AsyncCapable")) {
|
||||
+ info_ptr->async_capable = atoi(tmp_value);
|
||||
+ info_ptr->mask |= SENSOR_DEF_BIT_ASYNC_CAPABLE;
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name, "Virtual")) {
|
||||
+ info_ptr->virtual_sensor = atoi(tmp_value);
|
||||
+ } else if (!strcasecmp((const char*) cur_node->name,
|
||||
+ "SensorLink")) {
|
||||
+ parse_new_sensor_link(cur_node->children, doc,
|
||||
+ &info_ptr->sensor_link);
|
||||
+ }
|
||||
xmlFree(tmp_value);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +0,0 @@
|
||||
From 07d7077af1992d52733b0dcf18538690a87b877f Mon Sep 17 00:00:00 2001
|
||||
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
|
||||
Date: Fri, 30 Jun 2017 10:42:17 -0700
|
||||
Subject: [PATCH] Update README to start service
|
||||
|
||||
Added comment for starting service when using upstart and systemd.
|
||||
---
|
||||
README.txt | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/README.txt b/README.txt
|
||||
index 26ba507..f67bf7f 100644
|
||||
--- a/README.txt
|
||||
+++ b/README.txt
|
||||
@@ -66,8 +66,17 @@ Build
|
||||
(It will give error for systemd configuration, but ignore)
|
||||
cp data/thermald.conf /etc/init/
|
||||
3.
|
||||
-Use "sudo start thermald" to start
|
||||
-Use "sudo stop thermald" to stop
|
||||
+If using upstart
|
||||
+ Use "sudo start thermald" to start
|
||||
+ Use "sudo stop thermald" to stop
|
||||
+
|
||||
+If using systemd, use
|
||||
+- start service
|
||||
+ sudo systemctl start thermald.service
|
||||
+- Get status
|
||||
+ sudo systemctl status thermald.service
|
||||
+- Stop service
|
||||
+ sudo systemctl stop thermald.service
|
||||
|
||||
-------------------------------------------
|
||||
|
@ -1,39 +1,20 @@
|
||||
# Explicitly turn on hardening, if required.
|
||||
%if (0%{?fedora} && 0%{?fedora} <= 22) || (0%{?rhel} && 0%{?rhel} <= 7)
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
%global _hardened_build 1
|
||||
%endif # (0%%{?fedora} && 0%%{?fedora} <= 22) || (0%%{rhel} && 0%%{?rhel} <= 7)
|
||||
%endif
|
||||
|
||||
%global pkgname thermal_daemon
|
||||
|
||||
|
||||
Name: thermald
|
||||
Version: 1.6
|
||||
Release: 8%{?dist}
|
||||
Version: 1.7.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Thermal Management daemon
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://github.com/01org/%{pkgname}
|
||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
|
||||
# Fixes from upstream.
|
||||
Patch0: %{url}/commit/a8eba71a95b3b8af0540f6a93877e24bc8c47079.patch#/%{name}-1.6-thd_cdev_target_value_initialized.patch
|
||||
Patch1: %{url}/commit/6a2344b4a55acc0cba356d0f7c521c0cdb6632e0.patch#/%{name}-1.6-fix_build_warnings_on_32bits.patch
|
||||
Patch2: %{url}/commit/2a00d1745161c6d11b927f025ff1f4bb44f61d15.patch#/%{name}-1.6-load_preference_from_xml_file.patch
|
||||
Patch3: %{url}/commit/37a25879239466f2d096fd1a58b2ac7bbc3958f5.patch#/%{name}-1.6-set_default_preference.patch
|
||||
Patch4: %{url}/commit/35bda2d052b8820cbfce6c1918e3866c6fa3fd76.patch#/%{name}-1.6-update_QCustomPlot_2_0_0_beta.patch
|
||||
Patch5: %{url}/commit/8e76666785f732aa2c70c626b242cffd566ea434.patch#/%{name}-1.6-distribution_integration_update_RPM_spec_for_1_6.patch
|
||||
Patch6: %{url}/commit/e311dc88d3acac7eca593efea5d95507b02608da.patch#/%{name}-1.6-remove_duplicate_assignment_to_critical_temp.patch
|
||||
Patch7: %{url}/commit/7ee77cce542b2ed0421133b01904d5ad0ecdab6f.patch#/%{name}-1.6-thd_parse_check_for_xmlNodeListGetString_NULL_returns.patch
|
||||
Patch8: %{url}/commit/8f7d49be960dd19edaef452a89b541e4509caef7.patch#/%{name}-1.6-fix_typo_on_field_name_default_prefernce.patch
|
||||
Patch9: %{url}/commit/18989faac5138213a99f63346e49f4279caad9fb.patch#/%{name}-1.6-dont_terminate_the_thermald_engine_if_thd_engine_is_null.patch
|
||||
Patch10: %{url}/commit/90169f80a70efd4d5b6101e87666cd355dbd786f.patch#/%{name}-1.6-removed_compile_flags.patch
|
||||
Patch11: %{url}/commit/93e52afc389c98880b91d61cf47c0603f4654ccd.patch#/%{name}-1.6-android_fix_build_file.patch
|
||||
Patch12: %{url}/commit/bcbb8ea8e6ced976d4359db9bc4c35a9d8f345ba.patch#/%{name}-1.6-android_fix_compile_errors.patch
|
||||
Patch13: %{url}/commit/9c5d8354dd8efff340a030c05f7beda03061cd0a.patch#/%{name}-1.6-fix_dbus_re-init_accessing_deleted_pointer.patch
|
||||
Patch14: %{url}/commit/18d6ca75bbc504aaf9fe862dc1c10c3c65fbe7bd.patch#/%{name}-1.6-initialize_lowest_valid_index_to_prevent_SEGV.patch
|
||||
Patch15: %{url}/commit/07d7077af1992d52733b0dcf18538690a87b877f.patch#/%{name}-1.6-update_README_to_start_service.patch
|
||||
Patch16: %{url}/pull/133.patch#/%{name}-1.6-silence_compiler_warnings_and_enable_Werror.patch
|
||||
|
||||
# No cpuid.h on other arches.
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
|
||||
@ -44,7 +25,7 @@ BuildRequires: desktop-file-utils
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: glib-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-devel
|
||||
|
||||
Requires: dbus%{?_isa}
|
||||
|
||||
@ -277,6 +258,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 28 2017 Björn Esser <besser82@fedoraproject.org> - 1.7.1-1
|
||||
- New upstream release (#1505144)
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user