5 #include "power_management.h"
7 #define PROC_FILE "/proc/i8k"
9 /* we check for /proc/i18k */
10 int machine_is_dell(void)
12 FILE *fp
= fopen(PROC_FILE
, "r");
23 int dell_get_fan_status(void)
25 FILE *fp
= fopen(PROC_FILE
, "r");
29 if (!fp
) return PM_Error
;
31 if (fscanf(fp
, "%*s%*s%*s%*s%d%d", &fan_status
, &fan_2_status
) == 2)
34 return (fan_status
+ fan_2_status
);
41 int dell_get_temperature(void)
43 FILE *fp
= fopen(PROC_FILE
, "r");
46 if (!fp
) return PM_Error
;
48 if (fscanf(fp
, "%*s%*s%*s%d", &result
) == 1)