mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-11-22 10:02:47 +07:00
First Commit
This commit is contained in:
14
external/packages/extras-buildpkgs/htop/debian/patches/cpu-temperatute-from-hwmon.patch
vendored
Normal file
14
external/packages/extras-buildpkgs/htop/debian/patches/cpu-temperatute-from-hwmon.patch
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/linux/Platform.c b/linux/Platform.c
|
||||
index bde3e3b..e7e2010 100644
|
||||
--- a/linux/Platform.c
|
||||
+++ b/linux/Platform.c
|
||||
@@ -175,6 +175,9 @@ int Platform_getCpuTemp() {
|
||||
if (!fd) {
|
||||
fd = fopen("/sys/devices/virtual/thermal/thermal_zone0/temp", "r");
|
||||
}
|
||||
+ if (!fd) {
|
||||
+ fd = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r");
|
||||
+ }
|
||||
if (fd) {
|
||||
int n = fscanf(fd, "%d", &Temp);
|
||||
fclose(fd);
|
||||
Reference in New Issue
Block a user