Changeset 290
- Timestamp:
- 03/02/99 09:08:29 (14 years ago)
- Location:
- lm-sensors/trunk/prog/detect
- Files:
-
- 2 modified
-
detect.pl (modified) (5 diffs)
-
sensors-detect (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/prog/detect/detect.pl
r287 r290 744 744 745 745 # Find out whether our new entry should go into the detected or the 746 # misdetected list. We only compare main i2c_addr here; so we can have 747 # the unlikely case that we replace a subsidiary i2c_addr with a higher 748 # confidence value. Too bad. 746 # misdetected list. We compare all i2c addresses; if at least one matches, 747 # but our conf value is lower, we assume this is a misdetect. 748 @hash_addrs = ($datahash->{i2c_addr}); 749 push @hash_addrs, @{$datahash->{i2c_sub_addrs}} 750 if exists $datahash->{i2c_sub_addrs}; 749 751 $put_in_detected = 1; 750 752 FIND_LOOP: … … 752 754 foreach $detected_entry (@{$main_entry->{detected}}) { 753 755 if ($detected_entry->{i2c_devnr} == $datahash->{i2c_devnr} and 754 $detected_entry->{i2c_addr} == $datahash->{i2c_addr}) {756 any_list_match \@entry_addrs, \@hash_addrs) { 755 757 if ($detected_entry->{conf} >= $datahash->{conf}) { 756 758 $put_in_detected = 0; … … 891 893 } 892 894 893 # No rfound? OK, put it in the detected list895 # Not found? OK, put it in the detected list 894 896 push @$new_detected_ref, $datahash; 895 897 } … … 899 901 # $_[2]: The name of the algorithm, as appearing in /proc/bus/i2c 900 902 # $_[3]: The driver of the adapter 903 # @_[4..]: Addresses not to scan 901 904 sub scan_adapter 902 905 { … … 935 938 @chips = sort @chips; 936 939 foreach $other_addr (sort @chips) { 937 printf(" %02x",$other_addr);940 printf(" 0x%02x",$other_addr); 938 941 } 939 942 } -
lm-sensors/trunk/prog/detect/sensors-detect
r287 r290 744 744 745 745 # Find out whether our new entry should go into the detected or the 746 # misdetected list. We only compare main i2c_addr here; so we can have 747 # the unlikely case that we replace a subsidiary i2c_addr with a higher 748 # confidence value. Too bad. 746 # misdetected list. We compare all i2c addresses; if at least one matches, 747 # but our conf value is lower, we assume this is a misdetect. 748 @hash_addrs = ($datahash->{i2c_addr}); 749 push @hash_addrs, @{$datahash->{i2c_sub_addrs}} 750 if exists $datahash->{i2c_sub_addrs}; 749 751 $put_in_detected = 1; 750 752 FIND_LOOP: … … 752 754 foreach $detected_entry (@{$main_entry->{detected}}) { 753 755 if ($detected_entry->{i2c_devnr} == $datahash->{i2c_devnr} and 754 $detected_entry->{i2c_addr} == $datahash->{i2c_addr}) {756 any_list_match \@entry_addrs, \@hash_addrs) { 755 757 if ($detected_entry->{conf} >= $datahash->{conf}) { 756 758 $put_in_detected = 0; … … 891 893 } 892 894 893 # No rfound? OK, put it in the detected list895 # Not found? OK, put it in the detected list 894 896 push @$new_detected_ref, $datahash; 895 897 } … … 899 901 # $_[2]: The name of the algorithm, as appearing in /proc/bus/i2c 900 902 # $_[3]: The driver of the adapter 903 # @_[4..]: Addresses not to scan 901 904 sub scan_adapter 902 905 { … … 935 938 @chips = sort @chips; 936 939 foreach $other_addr (sort @chips) { 937 printf(" %02x",$other_addr);940 printf(" 0x%02x",$other_addr); 938 941 } 939 942 }
