Changeset 4164
- Timestamp:
- 09/20/06 20:10:12 (7 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
CHANGES (modified) (1 diff)
-
prog/eeprom/decode-vaio.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4163 r4164 47 47 Various output cleanups and fixes 48 48 Program decode-edid.pl: Add /usr/sbin or /usr/local/sbin to $PATH if needed 49 Program decode-vaio.pl: Detect and skip false positives 49 50 Program i2cdetect: Add a mode to print adapter functionalities 50 51 Program i2cdump: Restore bank after bank switching -
lm-sensors/trunk/prog/eeprom/decode-vaio.pl
r3070 r4164 1 1 #!/usr/bin/perl -w 2 2 # 3 # Copyright (C) 2002-200 5Jean Delvare <khali@linux-fr.org>3 # Copyright (C) 2002-2006 Jean Delvare <khali@linux-fr.org> 4 4 # 5 5 # This program is free software; you can redistribute it and/or modify … … 42 42 # Version 1.3 2005-01-18 Jean Delvare <khali@linux-fr.org> 43 43 # Revision might be a Service Tag. 44 # Version 1.4 2006-09-20 Jean Delvare <khali@linux-fr.org> 45 # Detect and skip false positives (e.g. EDID EEPROMs). 44 46 # 45 47 # EEPROM data decoding for Sony Vaio laptops. … … 181 183 my ($bus,$addr) = @_; 182 184 183 print_item('Machine Name', decode_string($bus, $addr, 128, 32)); 185 my $name = decode_string($bus, $addr, 128, 32); 186 # Simple heuristic to skip false positives 187 return 0 unless $name =~ m/^[A-Z-]{4}/; 188 189 print_item('Machine Name', $name); 184 190 print_item('Serial Number', decode_string($bus, $addr, 192, 32)); 185 191 print_item('UUID', decode_uuid($bus, $addr, 16)); … … 190 196 print_item('OEM Data', decode_string($bus, $addr, 32, 16)); 191 197 print_item('Timestamp', decode_string($bus, $addr, 224, 32)); 198 return 1; 192 199 } 193 200 … … 195 202 { 196 203 print("Sony Vaio EEPROM Decoder\n"); 197 print("Copyright (C) 2002-200 5Jean Delvare\n");198 print("Version 1. 3\n\n");204 print("Copyright (C) 2002-2006 Jean Delvare\n"); 205 print("Version 1.4\n\n"); 199 206 } 200 207 … … 209 216 { 210 217 $sysfs = 1; 211 vaio_decode($i, '57'); 212 $found++; 218 $found += vaio_decode($i, '57'); 213 219 } 214 220 elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$i-57") … … 222 228 { 223 229 $sysfs = 0; 224 vaio_decode($i, '57'); 225 $found++; 230 $found += vaio_decode($i, '57'); 226 231 } 227 232 }
