On 2013.06.21 07:43, Bent Bisballe Nyeng wrote:
> A couple of months ago I had the need for a linux and windows usb
> hotplug feature with libusbx and saw that there were one in the making.
> However since it was not about to be released just yet (evidently) I was
> forced to make my own.

I'm afraid you didn't. See below.

> I modelled it on top of the proposed api from one of the libusb hotplug
> git repos in order to make the transition to the libusbx hotplug api
> easier once it got released.
>
> But now that it is on the verge of release I see that there are no
> windows support?!

And here we go...
Please don't take the following personally. I do understand that not 
everyone is supposed to know the long and strenuous libusb history when 
it comes to the hotplug feature.

<Pete Is Truly Annoyed (PITA) mode ON>
In July 2010, a.k.a. 3 FRIGGIN YEARS AGO, Nokia came to libusb with a 
patch that added hotplug for Linux and OS-X. Libusb being libusb, this 
patch was ignored (or more exactly, somewhat politely dismissed)
Shortly afterwards (Sept/October), I spent time remodelling that patch 
and adding hotplug for Windows. This work was completed around 
2010.10.15 [1], and from that day forward, a WORKING base hotplug 
implementation, that encompasses all of Linux, OS X and Windows, has 
been publicly available for libusb.

Now, libusb being libusb, that work was completely ignored for, weeks, 
then months, and eventually years, and as a result, I ceased to maintain 
that hotplug branch.

Then, in December 2012, a bunch of libusb people semi-privately (as far 
as I can tell) decided they would add hotplug to libusb and also decided 
they would completely ignore any existing work. What's more, even though 
they were crafting a cross platform API, where Windows does feature 
prominently, I have reason to believe they didn't bother looking at the 
EXISTING Windows hotplug code from the previous proposal to find out if 
their proposal --that was designed and tested on POSIXish systems-- may 
end up encountering limitations on Windows. Instead, they pressed 
forward with a "not-invented-here" implementation, in the hope that the 
"Windows guy" (that's me) would quickly sort things out on his own, FOR 
THE FRIGGING SECOND TIME, by trying to push a Linux + OS X hotplug 
release ASAP (but, with libusb being libusb, with the ASAP part not 
turning out so well, and eventually resulting in a putsch having to be 
staged).

Also during these long years of not having hotplug integrated in libusb 
(despite the presence of a working proposal), various people just like 
yourself [2] decided that they really needed a libusb hotplug 
implementation for Windows. However, rather than contact one of our 
lists and propose to help the libusb/libusbx project(s) (as well as the 
"Windows guy", who, due to various circumstances, doesn't have as much 
time to spend on libusb/libusbx as he had when he did his Windows/hp 
implementation 3 FRIGGING YEARS AGO), they just went ahead and did their 
own private things, announced it, while also wondering why a project, 
that actually has a very limited set of developers (all of whom have a 
very limited amount of time they can devote to libusb/libusbx AFAIK), 
wasn't catching up...

So, I hope you'll excuse me for being flippant with being questioned why 
something I did 3 FRIGGING YEARS AGO ALREADY has not been redone, as 
well as being somewhat expected to dig through some code (yours) that, 
regardless of its quality, will still be missing the crucial "ensuring 
that this code is fit for integration by working with the project 
maintainers" step. The hard part is not getting Windows hotplug code for 
libusb. Right now, there's plenty to choose from. The hard part is doing 
the integration, then following up with it as well as addressing 
whatever bugs or improvement requests arise afterwards, i.e. a full 
commitment to your code proposal, where, if you really intend the 
project to use your work, you are supposed to take full ownership and 
follow up on it, rather than announce a code drop.
<PITA mode off>

> For reference and potential help for this I therefore supply my own
> implementation, and hope it might be of some use to you.
>
> You can fetch it at: http://www.aasimon.org/libusbhp/
>
> Regarding the license, I'm willing to change it to a more loose one
> (currently GPL v3) if you wish to use some of the code directly.

That's great (and yeah, if it was up to me, I'd use the GPL3 everywhere, 
especially for libraries [3], though, if you respect the original work, 
you should try to respect the wishes of the original creator in terms of 
licensing), but it would have been a lot better if you had contacted us 
before you started this effort, first because we would have had a chance 
to point you towards the old hp branch, or the updated nonolith one, 
which I don't believe you are aware of, and second because we could have 
asked you if you were interested in bringing either of these branches up 
to speed for the new API, which would probably have saved everybody 
(including yourself) a lot of effort.

Now, considering that you only propose this code for reference, and 
changed the license, I gather that right now, you consider that your 
effort is done, and that you may have little interest in taking over the 
role of implementer for the Windows hotplug implementation of libusb, right?

If not, then you really have my full blessing to work with the people 
who decided on the new hp API and incorporate whatever you feel is best 
for the Windows implementation (while I get to avoid redoing 
<PITA>SOMETHING I DID 3 FRIGGING YEARS AGO, THAT HAS BEEN REPEATEDLY 
IGNORED</PITA>).

Regards,

/Pete

[1] 
http://git.libusb.org/?p=libusb/libusb-pbatard.git;a=shortlog;h=refs/heads/hp;js=1
[2] https://github.com/libusbx/libusbx/issues/9
[3] http://www.gnu.org/philosophy/why-not-lgpl.html


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to