[PATCH 1/2] contrib/m920x/m920x_parse.pl: stricter check when extracting firmware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Extract firmware only from the right messages, skip the other messages.

Signed-off-by: Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx>
---
 contrib/m920x/m920x_parse.pl |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 contrib/m920x/m920x_parse.pl

diff --git a/contrib/m920x/m920x_parse.pl b/contrib/m920x/m920x_parse.pl
old mode 100644
new mode 100755
index b309250..a6ca80a
--- a/contrib/m920x/m920x_parse.pl
+++ b/contrib/m920x/m920x_parse.pl
@@ -195,8 +195,9 @@ if ($mode eq "fw") {
 			last;
 		}
 
+		my $is_fw_msg = $bytes[0] eq "40" && $bytes[1] eq "30";
 		my $len = hex($bytes[6] . $bytes[7]);
-		if ($len < 32) {
+		if (!$is_fw_msg || $len < 32) {
 			next;
 		}
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux