From a29361a8e6c20189c6918e1f2a749102845e3145 Mon Sep 17 00:00:00 2001 From: Agontuk Date: Wed, 22 Apr 2015 14:42:59 +0600 Subject: Don't try to read temparature file if TW_NO_CPU_TEMP is set to true. Otherwise, recovery log gets filled up with "I:Cannot find file /sys/class/thermal/thermal_zone0/temp" This also fixes build warnings due to duplicate definition of TW_NO_CPU_TEMP. Change-Id: Ib7fdcd103d6684249c38c8b14ec85f2faba158f6 --- data.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'data.cpp') diff --git a/data.cpp b/data.cpp index eb8b55341..52457df8f 100644 --- a/data.cpp +++ b/data.cpp @@ -891,6 +891,10 @@ int DataManager::GetMagicValue(const string varName, string& value) } else if (varName == "tw_cpu_temp") { + int tw_no_cpu_temp; + GetValue("tw_no_cpu_temp", tw_no_cpu_temp); + if (tw_no_cpu_temp == 1) return -1; + string cpu_temp_file; static unsigned long convert_temp = 0; static time_t cpuSecCheck = 0; -- cgit v1.2.3