diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 3250d64f..33215fbc 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,7 @@ +2005-07-25 Joerg Wunsch + + * usb_libusb.c: Catch benign errors when reading the serial #. + 2005-06-19 Joerg Wunsch * Makefile.am: Implement libusb-base USB transport for the diff --git a/avrdude/usb_libusb.c b/avrdude/usb_libusb.c index d7b98455..d53d04b9 100644 --- a/avrdude/usb_libusb.c +++ b/avrdude/usb_libusb.c @@ -117,7 +117,17 @@ static int usbdev_open(char * port, long baud) fprintf(stderr, "%s: usb_open(): cannot read serial number \"%s\"\n", progname, usb_strerror()); - exit(1); + /* + * On some systems, libusb appears to have + * problems sending control messages. Catch the + * benign case where the user did not request a + * particular serial number, so we could + * continue anyway. + */ + if (serno != NULL) + exit(1); /* no chance */ + else + strcpy(string, "[unknown]"); } if (verbose)