From: Thomas Jarosch Date: Mon, 7 Apr 2003 09:34:31 +0000 (+0000) Subject: libftdi: (tomj) report used eeprom size in ftdi_eeprom_build X-Git-Tag: v0.1^0 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=8ed611210cf9b99329aa0ef664a82523768594dd libftdi: (tomj) report used eeprom size in ftdi_eeprom_build --- diff --git a/ftdi/ftdi.c b/ftdi/ftdi.c index 96415f5..afd91f9 100644 --- a/ftdi/ftdi.c +++ b/ftdi/ftdi.c @@ -312,7 +312,7 @@ void ftdi_eeprom_initdefaults(struct ftdi_eeprom *eeprom) { /* ftdi_eeprom_build return codes: - 0: all fine + positive value: used eeprom size -1: eeprom size (128 bytes) exceeded by custom strings */ int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output) { @@ -464,7 +464,7 @@ int ftdi_eeprom_build(struct ftdi_eeprom *eeprom, unsigned char *output) { output[0x7E] = checksum; output[0x7F] = checksum >> 8; - return 0; + return size_check; }