diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c index 1b030729be9e..9c1f59d62221 100644 --- a/sys/powerpc/powermac/powermac_thermal.c +++ b/sys/powerpc/powermac/powermac_thermal.c @@ -109,9 +109,10 @@ pmac_therm_manage_fans(void) printf("WARNING: Current temperature (%s: %d.%d C) " "exceeds critical temperature (%d.%d C)! " "Shutting down!\n", sensor->sensor->name, - sensor->last_val / 10, sensor->last_val % 10, - sensor->sensor->max_temp / 10, - sensor->sensor->max_temp % 10); + (sensor->last_val - ZERO_C_TO_K) / 10, + (sensor->last_val - ZERO_C_TO_K) % 10, + (sensor->sensor->max_temp - ZERO_C_TO_K) / 10, + (sensor->sensor->max_temp - ZERO_C_TO_K) % 10); shutdown_nice(RB_POWEROFF); } } diff --git a/sys/powerpc/powermac/powermac_thermal.h b/sys/powerpc/powermac/powermac_thermal.h index 43bd6295a6b6..424c6122f0ad 100644 --- a/sys/powerpc/powermac/powermac_thermal.h +++ b/sys/powerpc/powermac/powermac_thermal.h @@ -29,6 +29,8 @@ #ifndef _POWERPC_POWERMAC_POWERMAC_THERMAL_H #define _POWERPC_POWERMAC_POWERMAC_THERMAL_H +#define ZERO_C_TO_K 2732 + struct pmac_fan { int min_rpm, max_rpm, default_rpm;