Commit 1e41879d authored by Anqing Zhao's avatar Anqing Zhao Committed by Commit Bot

Fix the return value of method ReadTemperatureSensorInfo

The return value of method ReadTemperatureSensorInfo should honor the information source, rather than always set as false.

Bug: None.
Change-Id: If107543591c450693eef197e42c3878637ce43b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771601Reviewed-by: default avatarDenis Kuznetsov <antrim@chromium.org>
Commit-Queue: Anqing Zhao <anqing@google.com>
Cr-Commit-Position: refs/heads/master@{#692280}
parent 9345311c
...@@ -228,7 +228,7 @@ bool ReadTemperatureSensorInfo(const base::FilePath& sensor_dir, ...@@ -228,7 +228,7 @@ bool ReadTemperatureSensorInfo(const base::FilePath& sensor_dir,
int32_t temperature = 0; int32_t temperature = 0;
if (base::ReadFileToString(temperature_path, &temperature_string) && if (base::ReadFileToString(temperature_path, &temperature_string) &&
sscanf(temperature_string.c_str(), "%d", &temperature) == 1) { sscanf(temperature_string.c_str(), "%d", &temperature) == 1) {
has_data = false; has_data = true;
// CPU temp in millidegree Celsius to Celsius // CPU temp in millidegree Celsius to Celsius
temperature /= 1000; temperature /= 1000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment