Compute MAX_*_SENSOR_TYPES at build time (#2378).

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5897 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2010-12-14 09:09:42 +00:00
1 parent a29f126e08
commit ff0bfc174d
3 files changed
+5 -2

No files matched your search

+1
View File
@@ -5,6 +5,7 @@ SVN HEAD
Makefile: Check for bison and flex
libsensors: Add support for intrusion detection (#2370)
Compute MAX_SUBFEATURES at run-time (#2378)
Compute MAX_*_SENSOR_TYPES at build time (#2378)
sensors.conf.defauit: Add a section for the W83627THF
Add a section for the SCH5127
sensors: Display 3 decimal places in raw output
+2
View File
@@ -140,8 +140,10 @@ typedef enum sensors_feature_type {
SENSORS_FEATURE_POWER = 0x03,
SENSORS_FEATURE_ENERGY = 0x04,
SENSORS_FEATURE_CURR = 0x05,
SENSORS_FEATURE_MAX_MAIN,
SENSORS_FEATURE_VID = 0x10,
SENSORS_FEATURE_INTRUSION = 0x11,
SENSORS_FEATURE_MAX_OTHER,
SENSORS_FEATURE_BEEP_ENABLE = 0x18,
SENSORS_FEATURE_UNKNOWN = INT_MAX,
} sensors_feature_type;
+2 -2
View File
@@ -136,8 +136,8 @@ static int sysfs_foreach_busdev(const char *bus_type,
char sensors_sysfs_mount[NAME_MAX];
#define MAX_MAIN_SENSOR_TYPES 6
#define MAX_OTHER_SENSOR_TYPES 2
#define MAX_MAIN_SENSOR_TYPES (SENSORS_FEATURE_MAX_MAIN - SENSORS_FEATURE_IN)
#define MAX_OTHER_SENSOR_TYPES (SENSORS_FEATURE_MAX_OTHER - SENSORS_FEATURE_VID)
#define MAX_SENSORS_PER_TYPE 24
/* max_subfeatures is now computed dynamically */
#define FEATURE_SIZE (max_subfeatures * 2)