add emacs indentation variables to source files in line with current vim settings
[monky] / src / linux.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */
2
3 #ifndef _LINUX_H
4 #define _LINUX_H
5
6 #include "common.h"
7
8 const char *get_disk_protect_queue(const char *);
9
10 struct i8k_struct {
11         char *version;
12         char *bios;
13         char *serial;
14         char *cpu_temp;
15         char *left_fan_status;
16         char *right_fan_status;
17         char *left_fan_rpm;
18         char *right_fan_rpm;
19         char *ac_status;
20         char *buttons_status;
21 };
22
23 struct i8k_struct i8k;
24
25 char *get_ioscheduler(char *);
26 int get_laptop_mode(void);
27 void update_gateway_info(void);
28
29 enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME };
30 void get_powerbook_batt_info(char *, size_t, int);
31
32 int open_sysfs_sensor(const char *dir, const char *dev, const char *type, int n,
33         int *divisor, char *devtype);
34
35 #define open_i2c_sensor(dev, type, n, divisor, devtype) \
36         open_sysfs_sensor("/sys/bus/i2c/devices/", dev, type, n, divisor, devtype)
37 #define open_platform_sensor(dev, type, n, divisor, devtype) \
38         open_sysfs_sensor("/sys/bus/platform/devices/", dev, type, n, divisor, devtype)
39 #define open_hwmon_sensor(dev, type, n, divisor, devtype) \
40         open_sysfs_sensor("/sys/class/hwmon/", dev, type, n, divisor, devtype)
41
42 double get_sysfs_info(int *fd, int arg, char *devtype, char *type);
43
44 #endif /* _LINUX_H */