Changeset 5161
- Timestamp:
- 03/24/08 17:16:15 (8 months ago)
- Files:
-
- i2c-tools/trunk/eeprom/decode-dimms.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
i2c-tools/trunk/eeprom/decode-dimms.pl
r5160 r5161 41 41 use Fcntl qw(:DEFAULT :seek); 42 42 use vars qw($opt_html $opt_bodyonly $opt_igncheck $use_sysfs $use_hexdump 43 @vendors %decode_callback $revision @dimm_list );43 @vendors %decode_callback $revision @dimm_list %hexdump_cache); 44 44 45 45 $revision = '$Revision$ ($Date$)'; … … 1105 1105 my $word = 0; 1106 1106 1107 # Look in the cache first 1108 return @{$hexdump_cache{$_[0]}} if exists $hexdump_cache{$_[0]}; 1109 1107 1110 open F, '<', $_[0] or die "Unable to open: $_[0]"; 1108 1111 while (<F>) { … … 1139 1142 $header and die "Unable to parse any data from hexdump '$_[0]'"; 1140 1143 $word and printc "Warning: Assuming big-endian order 16-bit hex dump"; 1144 1145 # Cache the data for later use 1146 $hexdump_cache{$_[0]} = \@bytes; 1141 1147 return @bytes; 1142 1148 }
