libftdi Archives

Subject: Re: [PATCH] Match close with open in ftdi_usb_get_strings

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: fahhem@xxxxxxxxxx
Date: Mon, 18 Apr 2016 23:06:01 +0200
Hi Fahrzin,

Am 09.04.2016 um 10:45 schrieb Fahrzin Hemmati:
> It seems libftdi has a lot of ...2() functions, so a major API revision
> may make sense to just wipe those compat layers away. In any case, I
> went with ftdi_usb_get_strings2() with a short compat wrapper that opens
> the device first so ftdi_usb_get_strings2() won't open nor close it,
> then closes it itself. This matches the expected behavior.
> 
> Here's the patch:

thanks, applied!

I had to manually copy the patch hunks over since the HTML email mangled
the diff lines. Patches are much better sent as text only messages ;)
Please double check I didn't break anything in the process.

I've massaged the changelog a bit, added the function to ftdi.h
and to the python wrapper.


libftdi has a few xxx2() functions to ensure backward compatibility.
If we ever change the API to be opaque like it is for the EEPROM
(get and set functions), then a major API revision might make sense.
I just don't want to break flashrom, openocd and a ton of other
programs for no real reason.

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread