- Introduce a define for ZERO_C_TO_K.
- Fix the printing of the temperature when we exceed the critical value. Approved by: nwhitehorn (mentor)
This commit is contained in:
parent
aa7e99afbd
commit
7736fb1874
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user