Changeset 5158 for i2c-tools/trunk/eeprom/decode-dimms.pl
- Timestamp:
- 03/24/08 11:27:54 (5 years ago)
- Files:
-
- 1 modified
-
i2c-tools/trunk/eeprom/decode-dimms.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c-tools/trunk/eeprom/decode-dimms.pl
r5157 r5158 338 338 } 339 339 340 sub printl ($$) # print a line w/ label and value340 sub printl($$) # print a line w/ label and value 341 341 { 342 342 my ($label, $value) = @_; … … 356 356 } 357 357 358 sub printl2 ($$) # print a line w/ label and value (outside a table)358 sub printl2($$) # print a line w/ label and value (outside a table) 359 359 { 360 360 my ($label, $value) = @_; … … 370 370 } 371 371 372 sub prints ($) # print seperator w/ given text372 sub prints($) # print seperator w/ given text 373 373 { 374 374 my ($label) = @_; … … 383 383 } 384 384 385 sub printh ($$) # print header w/ given text385 sub printh($$) # print header w/ given text 386 386 { 387 387 my ($header, $sub) = @_; … … 400 400 } 401 401 402 sub printc ($) # print comment402 sub printc($) # print comment 403 403 { 404 404 my ($comment) = @_; … … 1104 1104 # note that normal 'hexdump' format on a little-endian system byte-swaps 1105 1105 # words, using hexdump -C is better. 1106 sub read_hexdump ($)1106 sub read_hexdump($) 1107 1107 { 1108 1108 my $addr = 0; … … 1149 1149 } 1150 1150 1151 sub readspd64 ($$) { # reads 64 bytes from SPD-EEPROM 1151 sub readspd64($$) # reads 64 bytes from SPD-EEPROM 1152 { 1152 1153 my ($offset, $dimm_i) = @_; 1153 1154 my @bytes; … … 1175 1176 1176 1177 for (@ARGV) { 1177 if (/^-?-h/) {1178 if (/^-?-h/) { 1178 1179 print "Usage: $0 [-c] [-f [-b]] [-x file [files..]]\n", 1179 1180 " $0 -h\n\n", … … 1193 1194 EOF 1194 1195 exit; 1195 }1196 $opt_html = 1 if (/^-?-f/);1197 $opt_bodyonly = 1 if (/^-?-b/);1198 $opt_igncheck = 1 if (/^-?-c/);1199 $use_hexdump = 1 if (/^-x/);1200 push @dimm_list, $_ if ($use_hexdump && !/^-/);1196 } 1197 $opt_html = 1 if (/^-?-f/); 1198 $opt_bodyonly = 1 if (/^-?-b/); 1199 $opt_igncheck = 1 if (/^-?-c/); 1200 $use_hexdump = 1 if (/^-x/); 1201 push @dimm_list, $_ if ($use_hexdump && !/^-/); 1201 1202 } 1202 1203 $opt_body = $opt_html && ! $opt_bodyonly; 1203 1204 1204 if ($opt_body) 1205 { 1205 if ($opt_body) { 1206 1206 print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n", 1207 1207 "<html><head>\n",
