parse_cx231xx.pl: improve GPIO messages on decoding
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 8 Nov 2010 15:48:10 +0000 (13:48 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 8 Nov 2010 15:48:10 +0000 (13:48 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
contrib/cx231xx/parse_cx231xx.pl [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index d85a641..c62a299
@@ -88,7 +88,7 @@ sub parse_gpio($$$$$$)
        my $wlen = shift;
        my $payload = shift;
 
-       my $type = sprintf "Req %d: ", $req;
+       my $type;
        if ($req == 8) {
                $type .= "GET gpio";
        } elsif ($req == 9) {
@@ -101,7 +101,8 @@ sub parse_gpio($$$$$$)
 
        my $gpio_bit = $wvalue << 16 & $windex;
 
-       printf("$type 0x%04x len %d val = %s\n", $gpio_bit, $wlen, $payload);
+       printf("$type: Reqtype %3d Req %3d 0x%04x len %d val = %s\n",
+               $reqtype, $req, $gpio_bit, $wlen, $payload);
 }
 
 while (<>) {