Changeset 5879
- Timestamp:
- 11/03/10 14:00:59 (19 months ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 5 modified
-
CHANGES (modified) (1 diff)
-
doc/libsensors-API.txt (modified) (1 diff)
-
lib/Module.mk (modified) (1 diff)
-
lib/sensors.h (modified) (3 diffs)
-
lib/sysfs.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r5877 r5879 4 4 SVN HEAD 5 5 Makefile: Check for bison and flex 6 libsensors: Add support for intrusion detection 6 7 sensors: Display 3 decimal places in raw output 7 8 sensors-detect: Improve LM90 and W83L771 detection -
lm-sensors/trunk/doc/libsensors-API.txt
r5863 r5879 6 6 authors can quickly figure out how to test for the availability of a 7 7 given new feature. 8 9 0x431 lm-sensors SVN 10 * Added support for intrusion detection 11 enum sensors_feature_type SENSORS_FEATURE_INTRUSION 12 enum sensors_subfeature_type SENSORS_SUBFEATURE_INTRUSION_ALARM 13 enum sensors_subfeature_type SENSORS_SUBFEATURE_INTRUSION_BEEP 8 14 9 15 0x430 lm-sensors 3.2.0 -
lm-sensors/trunk/lib/Module.mk
r5863 r5879 34 34 # the public header files - in this case they are error.h and sensors.h. 35 35 LIBMAINVER := 4 36 LIBMINORVER := 3. 036 LIBMINORVER := 3.1 37 37 LIBVER := $(LIBMAINVER).$(LIBMINORVER) 38 38 -
lm-sensors/trunk/lib/sensors.h
r5863 r5879 2 2 sensors.h - Part of libsensors, a Linux library for reading sensor data. 3 3 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> 4 Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>4 Copyright (C) 2007, 2010 Jean Delvare <khali@linux-fr.org> 5 5 6 6 This library is free software; you can redistribute it and/or … … 142 142 SENSORS_FEATURE_CURR = 0x05, 143 143 SENSORS_FEATURE_VID = 0x10, 144 SENSORS_FEATURE_INTRUSION = 0x11, 144 145 SENSORS_FEATURE_BEEP_ENABLE = 0x18, 145 146 SENSORS_FEATURE_UNKNOWN = INT_MAX, … … 198 199 199 200 SENSORS_SUBFEATURE_VID = SENSORS_FEATURE_VID << 8, 201 202 SENSORS_SUBFEATURE_INTRUSION_ALARM = SENSORS_FEATURE_INTRUSION << 8, 203 SENSORS_SUBFEATURE_INTRUSION_BEEP, 200 204 201 205 SENSORS_SUBFEATURE_BEEP_ENABLE = SENSORS_FEATURE_BEEP_ENABLE << 8, -
lm-sensors/trunk/lib/sysfs.c
r5876 r5879 2 2 sysfs.c - Part of libsensors, a library for reading Linux sensor data 3 3 Copyright (c) 2005 Mark M. Hoffman <mhoffman@lightlink.com> 4 Copyright (C) 2007-20 08Jean Delvare <khali@linux-fr.org>4 Copyright (C) 2007-2010 Jean Delvare <khali@linux-fr.org> 5 5 6 6 This library is free software; you can redistribute it and/or … … 138 138 139 139 #define MAX_MAIN_SENSOR_TYPES 6 140 #define MAX_OTHER_SENSOR_TYPES 1140 #define MAX_OTHER_SENSOR_TYPES 2 141 141 #define MAX_SENSORS_PER_TYPE 24 142 142 #define MAX_SUBFEATURES 8 … … 144 144 #define FEATURE_TYPE_SIZE (MAX_SENSORS_PER_TYPE * FEATURE_SIZE) 145 145 146 /* Room for all 6 main types (in, fan, temp, power, energy, current) and 1147 other type (VID) with all their subfeatures + misc features */146 /* Room for all 6 main types (in, fan, temp, power, energy, current) and 2 147 other types (VID, intrusion) with all their subfeatures + misc features */ 148 148 #define SUB_OFFSET_OTHER (MAX_MAIN_SENSOR_TYPES * FEATURE_TYPE_SIZE) 149 149 #define SUB_OFFSET_MISC (SUB_OFFSET_OTHER + \ … … 191 191 case SENSORS_FEATURE_ENERGY: 192 192 case SENSORS_FEATURE_CURR: 193 case SENSORS_FEATURE_INTRUSION: 193 194 underscore = strchr(sfname, '_'); 194 195 name = strndup(sfname, underscore - sfname); … … 290 291 }; 291 292 293 static const struct subfeature_type_match intrusion_matches[] = { 294 { "alarm", SENSORS_SUBFEATURE_INTRUSION_ALARM }, 295 { "beep", SENSORS_SUBFEATURE_INTRUSION_BEEP }, 296 { NULL, 0 } 297 }; 292 298 static struct feature_type_match matches[] = { 293 299 { "temp%d%c", temp_matches }, … … 298 304 { "curr%d%c", curr_matches }, 299 305 { "energy%d%c", energy_matches }, 306 { "intrusion%d%c", intrusion_matches }, 300 307 }; 301 308 … … 412 419 switch (ftype) { 413 420 case SENSORS_FEATURE_VID: 421 case SENSORS_FEATURE_INTRUSION: 414 422 i = SUB_OFFSET_OTHER + 415 423 (ftype - SENSORS_FEATURE_VID) * FEATURE_TYPE_SIZE +
