Changeset 5561 for i2c-tools/trunk/eeprom/decode-vaio
- Timestamp:
- 12/11/08 17:56:54 (4 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-vaio (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-vaio
r5172 r5561 18 18 # MA 02110-1301 USA. 19 19 # 20 # EEPROM data decoding for Sony Vaio laptops. 20 # EEPROM data decoding for Sony Vaio laptops. 21 21 # 22 22 # The eeprom driver must be loaded. For kernels older than 2.6.0, the … … 62 62 { 63 63 my ($label,$value) = @_; 64 64 65 65 printf("\%16s : \%s\n",$label,$value); 66 66 } … … 72 72 my ($bus, $addr, $offset, $length) = @_; 73 73 my $filename; 74 74 75 75 if ($sysfs) 76 76 { … … 95 95 } 96 96 close(FH); 97 97 98 98 return $bytes; 99 99 } … … 104 104 my $values = ''; 105 105 my $remains = $length + $offset; 106 106 107 107 # Get all lines in a single string 108 108 while ($remains > 0) … … 117 117 $base += 16; 118 118 } 119 119 120 120 # Store the useful part in an array 121 121 my @bytes = split(/[ \n]/, $values); … … 133 133 my $string = read_eeprom_bytes($bus, $addr, $offset, $length); 134 134 $string =~ s/\x00.*$//; 135 135 136 136 return($string); 137 137 } … … 181 181 { 182 182 my ($bus,$addr) = @_; 183 183 184 184 my $name = decode_string($bus, $addr, 128, 32); 185 185 # Simple heuristic to skip false positives
