examples: fix incorrect error message in fxload

* Closes #3
 Updated netlink code to parse events that do not contain BUSNUM and
  DEVNUM but do have a DEVICE parameter.

 These netlink events are now parsed:
 >>>>>>>>>>>>>>>>>
 add@/devices/platform/brcm-ohci-0.0/usb3/3-2/3-2:1.0
 ACTION=add
 DEVPATH=/devices/platform/brcm-ohci-0.0/usb3/3-2/3-2:1.0
 SUBSYSTEM=usb
 SEQNUM=290
 PHYSDEVBUS=usb
 DEVICE=/proc/bus/usb/003/003
 PRODUCT=45e/28e/114
 TYPE=255/255/255
 INTERFACE=255/93/1
 <<<<<<<<<<<<<<<<<

 Also added a retry when opening the device file to work around a race condition with the kernel
Add API for allocating / freeing usb3 bulk streams + Linux implementation

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Add API for using bulk streams

Being able to allocate bulk-streams is not really useful if the user cannot
specify the stream ids when submitting transfers.

The actual stream id gets added to our private itransfer struct, and a setter +
getter are added to get to it. Unfortunately this is the only way to add
support for stream ids without breaking ABI. So this is another item to fix
when we do break ABI in libusb-2.0.

Bulk streams also use a separate transer type, to allow backends to determine
if a transfer is a bulk stream transfer or an ordinary bulk transfer. This is
added because there is no other reliable way to determine if a transfer is
a stream as the stream_id is part of the private itransfer struct so apps
re-using a transfer may not set it to 0. Adding a separate transfer-type
for this was suggested (and coded) by Nathan Hjelm.

Most users will likely use the new libusb_fill_bulk_stream_transfer()
though, and will never know the difference.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Removed unneeded casts

The parameters already match the function declaration; no need to cast.
Use @rpath in Xcode project

In the Xcode project, set:

LD_DYLIB_INSTALL_NAME = @rpath

Such that the built dylib's install name uses rpath, which is
generally what one wants.
darwin: Add support for bulk stream transfers.

This commit adds support for bulk streams to the darwin backend. I
have not had a chance to fully test this code as I have no access
to any devices that use this interface.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
darwin: code cleanup

Clean up some code in the darwin backend.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
darwin: correct endpoint address calculation

The backend was incorrectly calculating the addresses of endpoints
with directions other than kUSBIn and kUSBOut. This primarily affects
devices with multiple control endpoints. This commit should correct
the issue by only setting the direction bit when the direction is
kUSBIn.

Thanks to Jean-Etienne for identifying the issue.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
Windows: Fix broken WDK compilation

* void function call was returning a value
* introduced in 6d8dfe0aee41a3c7dd862c3de488df3ce452d86e
* also fix whitespaces
darwin: initial implemenations of the hotplug_poll function

This implementation makes use of the IOKitWaitQuiet which waits until
all IOKit processing is complete. The performance won't necessarily be
great but it should help codes that have not yet or cannot move to the
libusb hotplug API.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
core: fix/silence issues reported by Coverity

* libusb has been added to Coverity at https://scan.coverity.com/projects/2180
* Use "// coverity[keyword]" to silence the issues we don't care about
* All other issues from the Windows build have been fixed, apart from the closing of the DLLs.