13 #define ACPI_PATH "/proc/acpi" 14 15 16 struct supported { 17 int acpi; 18 int batteries; 19 int thermal_zones; 20 }; 21 22 struct battery { 23 int present; 24 int designed_capacity; 25 int last_full_capacity; 26 int remaining_capacity; 27 char capacity_state[5]; 28 char charging_state[20]; 29 char technology[50]; 30 char model_number[50]; 31 int serial_number; 32 char battery_type[10]; 33 char oem_info[255]; 34 }; 35 36 struct battery_t { 37 struct battery *next; 38 struct battery *prev; 39 int count; 40 }; 41 42 struct thermal_zone { 43 int temperature; 44 int critical_temperature; 45 int cooling_mode; 46 char state[50]; 47 }; 48 49 int get_name ( char *path, char *subpath, char *new_path )