Changeset 5027
- Timestamp:
- 11/19/07 23:21:04 (1 year ago)
- Files:
-
- i2c-tools/trunk/CHANGES (modified) (1 diff)
- i2c-tools/trunk/eeprom/decode-vaio.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
i2c-tools/trunk/CHANGES
r5026 r5027 6 6 Update manufacturer IDs. 7 7 decode-vaio: Private data might not be readable by non-root users 8 Print the asset tag 8 9 i2cset: Final status messages go to stdout 9 10 Return success even when readback fails or doesn't match i2c-tools/trunk/eeprom/decode-vaio.pl
r5026 r5027 46 46 # Version 1.5 2007-11-19 Jean Delvare <khali@linux-fr.org> 47 47 # UUID and serial number might be hidden 48 # The model name is actually the first half of the asset tag 48 49 # 49 50 # EEPROM data decoding for Sony Vaio laptops. … … 164 165 } 165 166 167 sub decode_hexa 168 { 169 my ($bus, $addr, $offset, $length) = @_; 170 171 my @bytes = unpack('C*', read_eeprom_bytes($bus, $addr, $offset, $length)); 172 my $string=''; 173 174 for(my $i=0;$i<$length;$i++) 175 { 176 $string.=sprintf('%02X', shift(@bytes)); 177 } 178 179 return($string); 180 } 181 166 182 sub decode_uuid 167 183 { … … 205 221 print_item(length($revision) > 2 ? 'Service Tag' : 'Revision', 206 222 $revision); 207 print_item('Model Name', 'PCG-'.decode_string($bus, $addr, 170, 4)); 223 print_item('Asset Tag', decode_string($bus, $addr, 170, 4). 224 decode_hexa($bus, $addr, 174, 12)); 208 225 print_item('OEM Data', decode_string($bus, $addr, 32, 16)); 209 226 print_item('Timestamp', decode_string($bus, $addr, 224, 32));
