diff options
Diffstat (limited to 'v4l2-apps/util/xc3028-firmware/extract_head.h')
-rw-r--r-- | v4l2-apps/util/xc3028-firmware/extract_head.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/v4l2-apps/util/xc3028-firmware/extract_head.h b/v4l2-apps/util/xc3028-firmware/extract_head.h index 9ca83377b..0bc0d19f9 100644 --- a/v4l2-apps/util/xc3028-firmware/extract_head.h +++ b/v4l2-apps/util/xc3028-firmware/extract_head.h @@ -83,7 +83,6 @@ char *extract_header = "#!/usr/bin/perl\n" " my $out = get_hunk($offset, $length);\n" "\n" " printf \"(len %d) \",$length if ($debug);\n" -// " write_le16($length);\n" "\n" " for (my $i=0;$i<$length;$i++) {\n" " printf \"%02x \",ord(substr($out,$i,1)) if ($debug);\n" @@ -99,8 +98,6 @@ char *extract_header = "#!/usr/bin/perl\n" " my $out = get_hunk($offset, $length);\n" "\n" " printf \"(len_fix %d) \",$length if ($debug);\n" -//"syswrite(OUTFILE, \"0123456789ABCDEF\");\n" -// " write_le16($length);\n" "\n" " for (my $i=0;$i<$length;$i++) {\n" " printf \"%02x \",ord(substr($out,$i,1)) if ($debug);\n" @@ -113,10 +110,12 @@ char *extract_header = "#!/usr/bin/perl\n" " syswrite(OUTFILE, substr($out,$i+1,1));\n" " syswrite(OUTFILE, substr($out,$i,1));\n" " $i+=2;\n" - " for (my $j=0;$j<$size;$j++) {\n" - " syswrite(OUTFILE, substr($out,$j+$i,1));\n" + " if ($size>0 && $size <0x8000) {\n" + " for (my $j=0;$j<$size;$j++) {\n" + " syswrite(OUTFILE, substr($out,$j+$i,1));\n" + " }\n" + " $i+=$size;\n" " }\n" - " $i+=$size;\n" " }\n" "}\n" "\n" |