libusb on my Linux box is returning EACCES error when invalid
permissions exist. Modify open to translate that into
SANE_STATUS_ECCESS_DENIED since that error description is
used for this case.
Modify sanei_usb_test.c to not treat access denied or busy
error codes as real failures since its expected to occur on
boxes that USB device is already claimed by another driver
and if that device uses default root only permissions.
strcmp() does not protect against NULL pointers and is
crashing on at least OS X for the fake devices we are creating
by setting device_number to MAX value.
Add a fake empty string to prevent this.
This lets test pass even when ran from a different location.
Also, added missing data files to distribution list.
These two things lets this test case pass when ran using "make distcheck".
Improving here means do not set LIBS/CFLAGS if library is not detected.
This prevents some unknown options based to ld when host is Linux and
target is mingw32/64. Further improvements are needed if one wants this
snmp support when cross compiling to really work.
Also, to make commit bisectable, updated all autofoo files using
'autoreconf -i -f' and repatching ltmain.sh.
Also, test-driver was missing from git repo but the Makefile.in
checked in expected it to exist.
- fixed a bug in sanei_constrain_value spotted by
viresh_shirol@yahoo.co.uk where range max was exceeded due to rounding
in quantization
- added test case for sane fixed values range
udev now comes with a hardware database (hwdb) which is meant to replace large
rule files as the one typically shipped with sane. This should significantly
speed up the processing of usb add events.
Add the required output format and add a special udev output mode which is
produces the udev file to be used with hwdb.
Sample hwdb file: <https://dev.archlinux.org/~tomegun/20-sane.hwdb>.
Sample udev+hwdb rules file:
<https://dev.archlinux.org/~tomegun/53-sane.rules>.
Similar support was recently added to gphoto2:
<http://sourceforge.net/p/gphoto/code/14490/>.
The new udev rules file does not support old udev/kernels as these anyway
don't support hwdb.
Moreover, it does not come with GROUP=/MODE= or ACL support as this can easily
be done externally by hooking into the libsane_matched envvar. In particular
systemd-logind uses this to do its own ACL handling.