Changeset 6013

Show
Ignore:
Timestamp:
01/23/12 09:17:06 (17 months ago)
Author:
khali
Message:

i2c-stub-from-dump: Be more tolerant on input dump format

Allow for uppercase hexadecimal digits, "|" instead of ":" as the address
separator, and an optional space before said separator. i2cdump doesn't
use any of these but other dump tools do, so this improves
compatibility.

Location:
i2c-tools/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c-tools/trunk/CHANGES

    r6002 r6013  
    11i2c-tools CHANGES 
    22----------------- 
     3 
     4SVN HEAD 
     5  i2c-stub-from-dump: Be more tolerant on input dump format 
    36 
    473.1.0 (2011-12-04) 
  • i2c-tools/trunk/stub/i2c-stub-from-dump

    r5830 r6013  
    128128 OUTER_LOOP: 
    129129        while (<DUMP>) { 
    130                 if (m/^([0-9a-f]0):(( [0-9a-fX]{2}){16})/) { 
     130                if (m/^([0-9a-f]0) ?[:|](( [0-9a-fX]{2}){16})/i) { 
    131131                        # Byte dump 
    132132                        my $offset = hex($1); 
     
    143143                                $bytes++; 
    144144                        } 
    145                 } elsif (m/^([0-9a-f][08]):(( [0-9a-fX]{4}){8})/) { 
     145                } elsif (m/^([0-9a-f][08]) ?[:|](( [0-9a-fX]{4}){8})/i) { 
    146146                        # Word dump 
    147147                        my $offset = hex($1);