r3279 - trunk/src/host/devirginator
werner at sita.openmoko.org
werner at sita.openmoko.org
Fri Oct 26 10:56:55 CEST 2007
Author: werner
Date: 2007-10-26 10:56:52 +0200 (Fri, 26 Oct 2007)
New Revision: 3279
Modified:
trunk/src/host/devirginator/envedit.pl
Log:
envedit.pl (readenv): added option -c to only warn about CRC errors, don't fail
Modified: trunk/src/host/devirginator/envedit.pl
===================================================================
--- trunk/src/host/devirginator/envedit.pl 2007-10-25 23:02:14 UTC (rev 3278)
+++ trunk/src/host/devirginator/envedit.pl 2007-10-26 08:56:52 UTC (rev 3279)
@@ -28,8 +28,9 @@
sub usage
{
print STDERR
-"usage: $0 [-I dir] [-s size] [-i file] [-o file|-p] [-f env_file]\n".
+"usage: $0 [-I dir] [-s size] [-c] [-i file] [-o file|-p] [-f env_file]\n".
" [var=[value] ...]\n".
+" -c ignore CRC errors in input environment\n".
" -i file read environment from file (default: use empty environment)\n".
" -o file write environment to file (default: write to stdout)\n".
" -p print environment in human-readable form to stdout\n".
@@ -38,7 +39,7 @@
" -I dir add directory to INC path (to find crc32.pl)\n".
" var= remove the specified variable\n".
" var=value set the specified variable\n".
-"The options -I and -s, if present, must precede all other options.\n";
+"The options -I, -c, and -s, if present, must precede all other options.\n";
exit(1);
}
@@ -78,7 +79,7 @@
if ($crc != $want) {
print STDERR sprintf("CRC error: expected 0x%08x, got 0x%08x\n",
$want, $crc);
- exit(1);
+ exit(1) unless $warn_crc;
}
foreach (split(/\000/, $env)) {
last if $_ eq "";
@@ -154,6 +155,11 @@
shift(@ARGV);
$ENV_SIZE = eval shift(@ARGV);
}
+ elsif ($ARGV[0] eq "-c") {
+ &usage if $have_crc;
+ shift(@ARGV);
+ $warn_crc = 1;
+ }
elsif ($ARGV[0] eq "-I") {
&usage if $have_crc;
&usage unless defined $ARGV[1];
More information about the commitlog
mailing list