Changeset 5159
- Timestamp:
- 03/24/08 12:28:33 (8 months ago)
- Files:
-
- i2c-tools/trunk/eeprom/decode-dimms.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
i2c-tools/trunk/eeprom/decode-dimms.pl
r5158 r5159 1175 1175 } 1176 1176 1177 for (@ARGV) { 1178 if (/^-?-h/) { 1177 # Parse command-line 1178 foreach (@ARGV) { 1179 if ($_ eq '-h' || $_ eq '--help') { 1179 1180 print "Usage: $0 [-c] [-f [-b]] [-x file [files..]]\n", 1180 1181 " $0 -h\n\n", 1181 " -f, --format print nice html output\n",1182 " -b, --bodyonly don't print html header\n",1182 " -f, --format Print nice html output\n", 1183 " -b, --bodyonly Don't print html header\n", 1183 1184 " (useful for postprocessing the output)\n", 1184 " -c, --checksum decode completely even if checksum fails\n",1185 " -c, --checksum Decode completely even if checksum fails\n", 1185 1186 " -x, Read data from hexdump files\n", 1186 " -h, --help display this usage summary\n";1187 " -h, --help Display this usage summary\n"; 1187 1188 print <<"EOF"; 1188 1189 … … 1195 1196 exit; 1196 1197 } 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 && !/^-/); 1198 1199 if ($_ eq '-f' || $_ eq '--format') { 1200 $opt_html = 1; 1201 next; 1202 } 1203 if ($_ eq '-b' || $_ eq '--bodyonly') { 1204 $opt_bodyonly = 1; 1205 next; 1206 } 1207 if ($_ eq '-c' || $_ eq '--checksum') { 1208 $opt_igncheck = 1; 1209 next; 1210 } 1211 if ($_ eq '-x') { 1212 $use_hexdump = 1; 1213 next; 1214 } 1215 1216 if (m/^-/) { 1217 print STDERR "Unrecognized option $_\n"; 1218 exit; 1219 } 1220 1221 push @dimm_list, $_ if $use_hexdump; 1202 1222 } 1203 1223 $opt_body = $opt_html && ! $opt_bodyonly;
