aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-17 10:08:43 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-17 10:08:43 -0200
commitc96937f831d4dcc4c7d1dd6696fd34535528ee75 (patch)
treee2607677c2db73f2fffbf1e81b29b245a474e4c2
parent7cd52d9071e91344b6295f955a042e1cc77053bb (diff)
parse_af9035.pl: allow to hide parsing errors
This is useful to discover what protocol messages are not handled yet. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rwxr-xr-xcontrib/af9035/parse_af9035.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/af9035/parse_af9035.pl b/contrib/af9035/parse_af9035.pl
index 5aaeab5b..07553151 100755
--- a/contrib/af9035/parse_af9035.pl
+++ b/contrib/af9035/parse_af9035.pl
@@ -31,6 +31,7 @@ my $hide_rd;
my $hide_wr;
my $hide_i2c_rd;
my $hide_i2c_wr;
+my $hide_errors;
my $argerr = "Invalid arguments.\nUse $0 [--debug] [--show_timestamp] [--hide-ir] [--hide-fw] [--hide-rd] [--hide-wr]\n";
@@ -42,6 +43,7 @@ GetOptions(
'hide_wr|hide-wr' => \$hide_wr,
'hide_i2c_rd|hide-i2c-rd' => \$hide_i2c_rd,
'hide_i2c_wr|hide-i2c-wr' => \$hide_i2c_wr,
+ 'hide_errors|hide-errors' => \$hide_errors,
'debug' => \$debug,
) or die $argerr;
@@ -75,6 +77,7 @@ sub print_send_recv($$$$$$)
my $data = pop @stack;
if (!$data) {
+ return if ($hide_errors);
$payload = ", recv_bytes = $payload" if ($payload && !($payload =~ /ERROR/));
printf "Missing control cmd:\n";
printf("\t%sRECV: len=%d, seq=%d, status=%d%s\n",
@@ -85,6 +88,7 @@ sub print_send_recv($$$$$$)
my ( $ctrl_ts, $ctrl_ep, $ctrl_len, $ctrl_seq, $ctrl_mbox, $ctrl_cmd, @ctrl_bytes ) = @$data;
if ($len && !$status && $ctrl_seq != $seq) {
+ return if ($hide_errors);
$payload = ", recv_bytes = $payload" if ($payload && !($payload =~ /ERROR/));
printf "Wrong sequence number:\n";
printf("\t%sSEND: len=%d, seq %d, mbox=0x%02x, cmd=%s%s",
@@ -224,6 +228,8 @@ while (<>) {
printf("// %sEP=0x%02x: %s\n", $timestamp, $ep, $payload) if ($debug);
+ next if (!$payload);
+
$timestamp = "" if (!$show_timestamp);
next if (!($ep == $ctrl_ep || $ep == $resp_ep));

Privacy Policy