[Libusbx-devel] Linux patches for 1.0.9 release

Xiaofan Chen xiaofanc at gmail.com
Wed Mar 28 09:32:18 EDT 2012


On Wed, Mar 28, 2012 at 8:29 PM, Pete Batard <pete at akeo.ie> wrote:
> Also, you have to realize that libusbk and Graeme's patch really do the same
> thing, even as their implementation may differ slightly. Thus, in terms of
> code, it doesn't change much whether we go with one or the other (and still
> in terms of code, what Graeme did doesn't strike me as better than what
> Travis did - on the contrary, it takes some dangerous liberties here and
> there, that I asked Graeme to address but that he wouldn't).

No this is not what I mean. I mean it is better not to use libusbk.dll
dependency but rather use Graeme's method (not his codes) to
use IOCTL to directly talk to libusb0.sys and libusbk.sys. Take
note libusb0.sys IOCTLs are all covered in libusbk.sys. So the
codes for libusb0.sys will work for libusbk.sys, you do not need
to double work.

> On the other hand, libusbk has the following major advantages:
> - It is in real-world use, with quite a few users, therefore has been tried
> and tested, unlike Graeme's proposal

Yes I have to agree with you here, libusbk may well be better tested
and I am one of the testers as well. :-)

Graeme's implementation does get used by his project and
his project seems to have quite some users. Not it is not that
bad actually.

> - It is well maintained and bugs are fixed by its author (which means
> someone else doesn't have to)

That is certainly true. :-)
I am the co-admin of libusbK after all but Travis does
all the hard work of coding. :-)

> - It provides us with BOTH libusbK.sys and libusb0.sys support, whereas
> Graeme's code only provides us with libusb0.sys, which will leave us having
> to do the same thing for libusbk.

This is not really true as libusbk.sys is compatible with libusb0.sys.
So if you've done libusb0.sys, libusbk.sys is in already.

> All in all, an IMO, reusing libusbk seems to beat the other approach hands
> down.
>
>
>> If we use libusbk.dll then the duration could
>> be shorter. I am more inclined to use Graeme's approach since
>> less dependency is a good thing.
>
> As explained above, dependency is not really an issue, as we could very
> easily remove it... provided we can sort the K vs X licensing issue.
>
> Currently K is dual BSD/GPLv3 whereas we are still LGPLv2.
>

This is a non-issue as you can use BSD option of libusbK.

If you do not like Graeme's codes (you may have very good reasons),
what I propose then is that we'd better not to depend on libusbK.dll,
but rather reuse libusbk.dll codes (use BSD option) and integrated
them into libusb-1.0 Windows backend. Not so sure about the size
increase though.
http://code.google.com/p/usb-travis/source/browse/trunk/libusbK/src/lib/sources

Take note libusbk codes are not compatible with Cygwin/MinGW gcc so
there will be some work to integrate the codes.

-- 
Xiaofan



More information about the libusbx mailing list