Changeset 5880
- Timestamp:
- 11/03/10 14:01:38 (19 months ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/sensors/chips.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r5879 r5880 6 6 libsensors: Add support for intrusion detection 7 7 sensors: Display 3 decimal places in raw output 8 Add support for intrusion detection 8 9 sensors-detect: Improve LM90 and W83L771 detection 9 10 Fix error seen if I2C bus numbers are not sequential -
lm-sensors/trunk/prog/sensors/chips.c
r5877 r5880 3 3 Copyright (C) 1998-2003 Frodo Looijaard <frodol@dds.nl> and 4 4 Mark D. Studebaker <mdsxyz123@yahoo.com> 5 Copyright (C) 2007 Jean Delvare <khali@linux-fr.org>5 Copyright (C) 2007-2010 Jean Delvare <khali@linux-fr.org> 6 6 7 7 This program is free software; you can redistribute it and/or modify … … 662 662 } 663 663 664 static void print_chip_intrusion(const sensors_chip_name *name, 665 const sensors_feature *feature, 666 int label_size) 667 { 668 char *label; 669 const sensors_subfeature *subfeature; 670 double alarm; 671 672 subfeature = sensors_get_subfeature(name, feature, 673 SENSORS_SUBFEATURE_INTRUSION_ALARM); 674 if (!subfeature) 675 return; 676 677 if ((label = sensors_get_label(name, feature)) 678 && !sensors_get_value(name, subfeature->number, &alarm)) { 679 print_label(label, label_size); 680 printf("%s\n", alarm ? "ALARM" : "OK"); 681 } 682 free(label); 683 } 684 664 685 void print_chip(const sensors_chip_name *name) 665 686 { … … 696 717 print_chip_curr(name, feature, label_size); 697 718 break; 719 case SENSORS_FEATURE_INTRUSION: 720 print_chip_intrusion(name, feature, label_size); 721 break; 698 722 default: 699 723 continue;
