Subject: could ignore unknown record types

From: Jim Paris <[email-masked]>
Date: Tue, 10 Jul 2007 17:56:15 -0400

Package: fxload
Version: 0.0.20020411-1
Severity: normal
Tags: patch

The "fxload" program exits if it encounters an unknown record type in
the hex file, such as types 2, 3, 4, 5.  Programs like srec_cat create
these, and they can be safely ignored in many cases.  The below
patch lets fxload warn but continue after encountering and unknown
record.

-jim

diff -urN fxload-0.0.20020411.orig/ezusb.c fxload-0.0.20020411/ezusb.c
--- fxload-0.0.20020411.orig/ezusb.c	2007-07-10 17:44:54.000000000 -0400
+++ fxload-0.0.20020411/ezusb.c	2007-07-10 17:46:12.000000000 -0400
@@ -357,8 +357,8 @@
 	}
 
 	if (type != 0) {
-	    fprintf (stderr, "unsupported record type: %u\n", type);
-	    return -3;
+	    fprintf (stderr, "ignoring unsupported record type: %u\n", type);
+	    continue;
 	}
 
 	if ((len * 2) + 11 >= strlen(buf)) {

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-2-686
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages fxload depends on:
ii  libc6                         2.5-9+b1   GNU C Library: Shared libraries

fxload recommends no packages.

-- no debconf information