]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix for new format
authoridgay <idgay>
Fri, 20 Jun 2008 21:22:40 +0000 (21:22 +0000)
committeridgay <idgay>
Fri, 20 Jun 2008 21:22:40 +0000 (21:22 +0000)
tos/lib/safe/tools/decode_flid.pl

index fc6467805972426b7b1ba2b04b963d9d4a14508c..9cdb767e00ef4cae65fc0baa0aebcc13130d7189 100644 (file)
@@ -43,25 +43,26 @@ if (defined ($fn)) {
            (s/\"$//g);
        }
        if (hex($fields[0]) == hex($flidstr)) {
-           $found = 1;
+           my $check = $fields[1];
            my $text = $fields[2];
-           my $check = $fields[3];
-           my $file = $fields[5];
-           my $line = $fields[6];
-           my $func = $fields[7];
+           my $loc = $fields[3];
+           my $func = $fields[4];
+
 
-           print "\n$line\n\n";
+           $found = 1;
 
            print "Deputy error message for flid $flidstr:\n\n";
 
-           printf "%s:%d: %s: Assertion failed in %s:\n  %s\n", 
-           $file, $line, $func, $check, $text;
-           
-           print "\n";
+           printf "%s: %s: Assertion failed in %s:\n  %s\n", 
+             $loc, $func, $check, $text;
        }
     }
     close INF;
 }
+else {
+    print "Usage: decode-flid.pl FLID flid-filename\n";
+    exit 2;
+}
 
 if (!$found) {
     print "oops -- flid $flidstr not found in file\n";