Wykres commitów

55 Commity (3c20a989cfec676fde7f64381f5d15dc6e30586a)

Autor SHA1 Wiadomość Data
David Ward b3d105cba5 Use snprintf() instead of strncpy() for space-padded strings
The output from the SCSI inquiry command uses fixed-length space-padded
strings, which are copied into null-terminated strings before use.

This is currently done using strncpy(), with the count parameter set to
the string's fixed length. Because a null terminator is not encountered
in the input, strncpy() does not write one in the output, and GCC warns
about potential string truncation. A null terminator is added manually,
but this is error prone (as shown by the fix for the microtek backend).

Use snprintf() instead, which guarantees a null-terminated result and
resolves the warnings from GCC.
2022-03-08 19:00:00 -05:00
David Ward 9daadb8512 sane-find-scanner: Improve output for possible USB scanners
Closes #575
2022-02-17 09:16:30 -05:00
Olaf Meeuwissen e79adde8b2
Use URL to refer users to copies of the GPL and LGPL
With the exception of use in three quotes as well as our inlcuded copy
of the GPL, all use of the Free Software Foundation's postal address
has been removed.

Re #320.
2021-02-12 17:41:38 +09:00
Olaf Meeuwissen e00d5462de Fix libusb related [-Werror=deprecated-declarations] warnings
See http://libusb.sourceforge.net/api-1.0/group__libusb__lib.html
2019-09-28 17:46:22 +09:00
Povilas Kanapickas e40596c2a5 Fix -Wimplicit-fallthrough warnings by adding standard annotations 2019-06-30 11:58:32 +03:00
Edward Betts e895ee55be sane-find-scanner: Recognize --help as a valid option 2017-12-05 22:07:26 +09:00
Olaf Meeuwissen 23891a2646 .editorconfig: trim trailing whitespace 2017-05-29 21:14:29 +09:00
Jörg Frings-Fürst e21bb28e50 Source code string typo fixes 2017-05-13 18:38:43 +09:00
Olaf Meeuwissen a9c813944e Make libusb-1.0 the default for USB support
When libusb-1.0 is not found, libusb-0.1 will be tried.  On BeOS and
OS2, nothing should have changed in terms of detection of USB support.

On all systems the --enable-libusb* flags are now ignored.  Instead, the
--with-usb and --without-usb flags now control support.  When neither is
given USB support will be enable if possible and disabled otherwise.  If
--with-usb is requested but not possible, ./configure will fail.  There
is no support to prefer libusb-0.1 over libusb-1.0.
2016-07-01 23:44:37 +09:00
Thomas Klausner a4cc05f677 Add DragonFly BSD support to sane-find-scanner (fixes 315206) 2015-11-08 18:56:49 +09:00
Nils Philippsen 66cb9b55c2 remove code which is never reached 2013-11-05 14:47:27 +01:00
Stéphane Voltz 3af775de44 make GL646 detection work again
- add GL646 detection
- don't close USB handle before probing chip so we avoid opening it again
2013-06-03 20:59:43 +02:00
Stéphane Voltz ede1d1083d add USB chip probe in libusb-1.0 case
- added check_usb_chip()
- add genesys usb chip check
2013-06-03 20:59:43 +02:00
Gerhard Jaeger 69a2ec6801 Fix another bug in the libusb1 part of functioin check_libusb_device()
that prevents sanner detection for certain devices.
2013-02-22 09:07:32 +01:00
Gerhard Jaeger 74eb71fa19 Setup libusb1 debugging after initialization
otherwise a segfault appears in triple -v mode.
2013-02-20 08:24:52 +01:00
Ruediger Meier 0e3d873624 build fix, use the right scsi header on win32
Now we are using either ddk/ntddscsi.h or ntddscsi.h and even don't
stop if we have none of them.
2012-01-21 22:16:50 -06:00
Chris Bagwell 8ac464a47d add support for libusb-win32
It is API compatible with libusb-0.1 that is already supported
but uses different header file name to prevent conflict with
Window's own usb.h.
2011-12-27 17:35:35 -06:00
Chris Bagwell 5061c2d5b2 More mingw portability updates.
Add check for winsock2.h for socket.h replancement. Also, use this
check to add ws2_32 library. Also, switch all winsock.h references
to winsock2.h.

Add check for getuid and getpass; which are not on mingw.

Add a syslog() replacement that is basically a print(). This
is also used by vsyslog() replacement.

Comment out parts of replacement sigprocmask.c on mingw.

To support these configure.in changes, I need to rebuild all
related files with autoconf 2.68 and libtool 2.4. Hand ported
our sane-backend specific changes to newer ltmain.sh.
2011-11-06 12:40:00 -06:00
Mattias Ellert ec738ed266 Updated Swedish translation, fix libusb warning. 2009-09-11 05:11:31 +02:00
Julien BLACHE ad1a44d92a Add support for libusb-1.0. 2009-02-19 13:57:45 +00:00
Mattias Ellert 71be983cdd use SCSITaskSGElement if available 2007-11-10 15:44:41 +00:00
Mattias Ellert 71f9081904 MacOS X updates 2007-11-10 11:35:34 +00:00
Henning Geinitz 92d177c049 Added USB support for DragonFlyBSD (bug #303183). 2006-03-11 12:56:34 +00:00
Henning Geinitz 2b425ad61c Added checks for altsetting =! 0. 2006-01-22 16:52:13 +00:00
Henning Geinitz 259a745dd4 Print more clear output if no USB scanners are found. Point to manual page. Warn
if libusb support hasn't been built.
2005-09-26 12:13:51 +00:00
Henning Geinitz 53fe9ae549 Don't print anything else but the found messages in "-q" mode. 2005-08-16 18:19:41 +00:00
Julien BLACHE ed5831c99f tools/sane-find-scanner: Added a hint about switching the scanner on and connecting it to the computer before doing anything else. 2004-12-29 15:39:12 +00:00
Henning Geinitz 2a36618fa2 When getting string descriptors, ask for the length of the descriptor first (bug
#301001).
2004-10-18 19:39:18 +00:00
Henning Geinitz aea72b506d Fixed compilation problem when compiled without libusb support. Print
sane-backends version number. Print if built without libusb.
2004-10-05 10:31:03 +00:00
Henning Geinitz 85b457a282 sane-find-scanner can now load USB descriptors from /proc/bus/usb/devices dumps
(e.g. from the unsupported scanner web pages). Minor modifications to some of
the chipset tests.
2004-10-04 18:29:37 +00:00
Henning Geinitz a072aedd06 Worked around a cygwin libusb compatibility problem (patch from Giuseppe Sacco
eppesuig at users.alioth.debian.org).
2004-08-23 15:32:22 +00:00
Henning Geinitz a199a0ce90 Look for NetBSD uscanner devices (bug #300815). 2004-06-22 16:29:18 +00:00
Mattias Ellert 3458605b55 SCSI scanners can now be selected by LUN on MacOS X
sane-find-scanner now finds SCSI scanners on MacOS X
making some sanei_scsi internal functions static
2004-06-19 21:31:42 +00:00
Jochen Eisinger 82737c0daf 2004-04-10 Jochen Eisinger <jochen@penguin-breeder.org>
* tools/sane-find-scanner.c, doc/sane-mustek_pp.man,
	  doc/sane-find-scanner.man: added support for detecting
	  mustek parallel port scanners.
2004-04-10 09:39:16 +00:00
Henning Geinitz 43d3cf687a Actually use the number of the alt setting when printing descriptors. Fixes bug
#300383 found by Gerard Klaver.
2003-12-14 17:29:25 +00:00
Frank Zago 3bda0d541d Port to Cygwin. 2003-09-24 03:41:48 +00:00
Henning Geinitz b3fd92c684 Added support for detecting USB chipsets to sane-find-scanner. 2003-07-18 12:11:01 +00:00
Henning Geinitz 748037c18b Check all interfaces. Print a more definite message when a scanner was found
to avoid confusion.
2003-02-19 19:40:44 +00:00
Henning Geinitz 238a1814b2 Format of output for devices supported by libusb and scanner module is the
same now. Minor output fixes.
2002-09-15 14:27:00 +00:00
Henning Geinitz aa0e51a932 Print USB descriptors (libusb) in -v -v mode. Print vendor and product names
(when available). Rewrote libusb heuristics.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-15 21:35:21 +00:00
Henning Geinitz 6e103ba768 Made verbosity option more flexible and added quiet option. In quiet mode,
print only the devices we have found. Don't check USB devices with SCSI
functions and vice versa if option force is not given. Don't do the libusb
scan if an explicit device name was given.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-14 16:39:03 +00:00
Henning Geinitz d2221d45a1 Added support for libusb. Made comments better readable and positioned after
the output of the devices.  Shorter output to fit into 80 chars.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-07-12 20:50:54 +00:00
Henning Geinitz 676903b82c For HP-UX, check the complete /dev/rscsi/ directory for SCSI sscanners, not
only the device files for the first two host adapters.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-06-28 15:28:21 +00:00
Henning Geinitz bef1529da8 Fixed indentation.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-06-25 18:49:44 +00:00
Henning Geinitz 3ee0145e35 Added support for scanning whole directories for SCSI and USB device files.
Moved SCSI and USB detection routines to their own functions.  Renamed
functions related to SCSI for clarity.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-06-25 18:41:57 +00:00
Frank Zago 370d4281c5 Check sanei_scsi_cmd() return values. In verbose mode: add a better explanation for failures, add a dump of the scsi inquiry in verbose mode. 2002-04-28 19:33:49 +00:00
Frank Zago e8578565b0 No changes. Fixed indentation. 2002-04-28 19:20:20 +00:00
Henning Geinitz 29c95ca954 Added OpenBSD device files.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-12-25 16:07:35 +00:00
Henning Geinitz b8ef033a47 Check for __hpux instead of __hpux__.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-10-02 20:38:07 +00:00
Henning Geinitz a9218c2311 Fixed minor bugs in debug output and documentation.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-08-26 10:39:54 +00:00