[1/2] contrib/m920x/m920x_parse.pl: stricter check when extracting firmware
Commit Message
Extract firmware only from the right messages, skip the other messages.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---
contrib/m920x/m920x_parse.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
mode change 100644 => 100755 contrib/m920x/m920x_parse.pl
old mode 100644
new mode 100755
@@ -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;
}