On one of my systems (a not-too-current FreeBSD 5.x), libusb appears
to have problems sending a control message (returns an "I/O error"). At least try to recover gracefully in the bening case where the user did not request a particular serial number, so we could continue anyway without knowing it. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@481 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
556eb032ef
commit
258eb700d7
|
@ -1,3 +1,7 @@
|
||||||
|
2005-07-25 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
* usb_libusb.c: Catch benign errors when reading the serial #.
|
||||||
|
|
||||||
2005-06-19 Joerg Wunsch <j@uriah.heep.sax.de>
|
2005-06-19 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||||
|
|
||||||
* Makefile.am: Implement libusb-base USB transport for the
|
* Makefile.am: Implement libusb-base USB transport for the
|
||||||
|
|
12
usb_libusb.c
12
usb_libusb.c
|
@ -117,7 +117,17 @@ static int usbdev_open(char * port, long baud)
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: usb_open(): cannot read serial number \"%s\"\n",
|
"%s: usb_open(): cannot read serial number \"%s\"\n",
|
||||||
progname, usb_strerror());
|
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)
|
if (verbose)
|
||||||
|
|
Loading…
Reference in New Issue