Rosen Penev
fc699d2bf5
treewide: Replace bzero with memset
...
bzero was removed in POSIX 2008. It is optionally unavailable with
uClibc-ng.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-10-03 11:47:50 -07:00
Rosen Penev
428bec49bf
sanei_scsi: Replace bcopy with memcpy
...
bcopy was deprecated in POSIX 2008 and is optionally unavailable with
uClibc-ng.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-10-03 11:47:50 -07:00
Rosen Penev
c320a72e32
treewide: Replace mktemp by mkstemp
...
mktemp has been removed in POSIX 2008. uClibc-ng optionally does not make
it available.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-10-03 11:47:49 -07:00
Olaf Meeuwissen
a08f5630d8
sanei_scsi: Fix [-Wdeprecated-declarations] compiler warning
...
The readdir_r() using loop in sanei_scsi_find_devices() has been
modified to use readdir().
With the exception of sane_cancel(), the SANE API is not re-entrant.
The sanei_scsi_find_devices() function is referenced neither directly
nor indirectly from any of the sane_cancel() implementations so there
is no inherent need to use readdir_r().
2017-07-08 18:40:09 +09:00
Olaf Meeuwissen
fc4b250a09
.editorconfig: use utf-8 charset throughout
2017-05-29 21:14:30 +09:00
Olaf Meeuwissen
23891a2646
.editorconfig: trim trailing whitespace
2017-05-29 21:14:29 +09:00
Olaf Meeuwissen
23cc2e1ba0
Fix include guard typo
...
This seems to have been present since the beginning of sanei/sanei_scsi.c.
2016-08-03 22:12:45 +09:00
Olaf Meeuwissen
fff1c5962a
Fix "discards 'const' qualifier from pointer target type" warnings
...
The line variable is not (and cannot be) declared 'const'. The string
variable points to a location in line, hence it is safe to cast away
'const'ness of the sanei_config_skip_whitespace() return value.
2015-11-11 22:41:58 +09: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
9bdff1dbdf
mingw32 compile fixes
...
The following updates were made to all directories but backends.
That still needs work. There are also still some pthread issues
and syslog is missing.
Windows doesn't support SIGHUP or SIGPIPE so make that optional.
Only include socket header files when sys/socket.h is detected.
Use winsock.h on windows.
Only include syslog.h when vsyslog() was detect by configure.
Skip FD_CLOEXEC when not supported by OS (not defined).
Only include sys/ioctl.h on platforms that define it.
2011-11-05 11:19:34 -05:00
Julien BLACHE
c5991b48a0
/proc/scsi is being deprecated in the Linux
...
kernel; use sysfs for SCSI device enumeration in
sanei_scsi_find_devices() by default, keep
sanei_proc_scsi_find_devices() as a fallback option.
2009-04-28 13:28:25 +00:00
m. allan noah
127c77c1e5
add class 6 to usb detection code, fix scsi detection bug
2008-03-28 14:13:23 +00:00
Mattias Ellert
ac71384c82
Typo
2007-11-16 18:37:07 +00:00
Mattias Ellert
71be983cdd
use SCSITaskSGElement if available
2007-11-10 15:44:41 +00:00
Mattias Ellert
93e856b53f
Cross compilation fixes and libtool update
2007-11-10 07:12:55 +00:00
Julien BLACHE
5dcf165795
Switch sanei_scsi to the SG_IO ioctl interface, instead of the
...
asynchronous SG3 read/write interface.
Makes it possible to use SCSI scanners in 32/64bit mixed environments,
thanks to the ioctl 32bit compatibility layer, which is NOT possible
using the SG3 interface.
2007-06-21 19:35:53 +00:00
Gerhard Jaeger
3766614f83
* sanei/sanei_scsi.c: Fixed retrieval of HZ.
2007-02-07 07:16:53 +00:00
Mattias Ellert
cfd52e328f
Adding some debugging. Fixing some warnings.
2005-11-22 21:17:20 +00:00
Henning Geinitz
00e9b16d58
Removed "const" to make gcc on OS/2 happy.
2005-07-17 16:18:34 +00:00
Frank Zago
5cab9b20c7
fixes for 64 bits platforms.
2004-11-13 19:43:01 +00:00
Gerhard Jaeger
ab64285ff9
Added resource manager library support.
2004-07-26 15:15:39 +00:00
Mattias Ellert
ac9ec0ff1c
Missed one...
2004-06-20 01:22:44 +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
Henning Geinitz
f99aea20cb
Increased SCSI buffer size on MacOS X. Patch from Mattias Ellert, bug #300601 .
2004-03-29 18:01:23 +00:00
Henning Geinitz
e7484c515e
Silenced some compilation warnings.
2003-12-27 17:48:39 +00:00
Henning Geinitz
66f4a68325
sanei_scsi.c should now compile with the new and old SCSI API of MacOS X. Patch
...
from Mattias Ellert <mattias.ellert@tsl.uu.se>.
2003-12-06 13:38:47 +00:00
Frank Zago
3bda0d541d
Port to Cygwin.
2003-09-24 03:41:48 +00:00
Henning Geinitz
2cf12103d8
Added support for the MacOS X IOKit SCSI Architecture Model API. Added support
...
for Firewire scanners. Patch from Guy Brooker <guy_brooker@mac.com>.
2003-08-21 10:33:34 +00:00
Abel Deuring
ee430a8af6
2003-07-17 Abel Deuring <a.deuring@satzbau-gmbh.de>
...
* sanei/sanei_scsi.c: improved SCSI error handling in
sanei_scsi_cmd2 for FREEBSD_CAM_INTERFACE
2003-07-17 20:35:25 +00:00
Henning Geinitz
fcd3e424a8
Fixed C++-like code for MacOS X (patch from Mattias Ellert
...
<mattias.ellert@tsl.uu.se>).
2003-06-04 18:55:38 +00:00
Henning Geinitz
30812eaa05
Added SCSI support for MacOS X (from Mattias Ellert
...
<mattias.ellert@tsl.uu.se>).
2003-04-30 23:02:17 +00:00
Henning Geinitz
967a3b2a37
Fixed some warnings.
2003-04-02 22:41:54 +00:00
Henning Geinitz
293a629d7c
OS/2 specific changes: memory for SRB now is allocated using _tcalloc()
...
instead of allocating on stack to avoid crossing 64k borders due to
restrictions of 16-bit device-driver. Cosmetic changes and some casts to
reduce compiler-warnings. Patch from Franz Bakan <fbakan@gmx.net>.
2003-03-16 11:04:19 +00:00
Henning Geinitz
646fbd05bc
Wait for the completion of all SCSI commands in sanei_scsi_flush_all_extended
...
(Linux). Without this fix, especially long running commands and command
queuing would cause memory corruption if the buffer was invalid after the
flush command.
2003-03-09 19:22:43 +00:00
Henning Geinitz
cb2e483d60
Disable the new Linux SG interface for sparc64 to work-around 32 bit userland
...
/ 64 bit kernel problems.
2003-01-17 12:21:16 +00:00
Abel Deuring
a690b94687
fixed an error in sanei_scsi.c from my last commit
...
Abel
2002-12-07 22:17:27 +00:00
Abel Deuring
aa85bb0192
sanei/sanei_scsi.c: improved error handling for Linux
2002-12-07 18:10:45 +00:00
Abel Deuring
9659512302
sanei/sanei_scci.c doc/sanei-scsi.man:
...
default timeout for SCSI commmands is now 120 seconds; added
the environment variable SANE_SCSICMD_TIMEOUT to override
the default value.
Abel
2002-09-04 22:13:44 +00:00
Henning Geinitz
bc16d554dc
Set buffer size to 64 kB for SOLARIS_USCSI_INTERFACE (reported by Ed Randall
...
<ed.randall@ingenotech.com>).
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-06-27 16:04:21 +00:00
Henning Geinitz
477e9c6334
Fixed request-sense handling for OpenStep (from Oliver Schirrmeister
...
<oschirr@abm.de>).
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-05-28 18:57:26 +00:00
Henning Geinitz
bc0c6449f0
Fixed sanei_scsi_cmd2() for OPENSTEP (from Oliver Schirrmeister
...
<oschirr@abm.de>).
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-05-22 18:09:33 +00:00
Henning Geinitz
00e8ac71fd
Use O_NONBLOCK when opening an sg device under Linux. Return
...
SANE_STATUS_DEVICE_BUSY if EBUSY. Check for buffer==0 for OS/2.
Henning Meier-Geinitz <henning@meier-geinitz.de>
2002-04-13 18:56:39 +00:00
Abel Deuring
4f70616c01
configure.in, configure, include/sanei/config.h.in
...
sanei/sanei_scsi.c: Added HAVE_SG_TARGET_STATUS for compatibility
with old Linux sg.h versions
Abel
2002-03-10 14:34:11 +00:00
Abel Deuring
eb0e878a0f
sanei/sanei_scsi.c: fixed a typo (Sg_scsi_id -> SG_scsi_id)
...
Abel
2002-03-07 20:45:52 +00:00
Abel Deuring
6a57e91a51
* sanei/sanei_scsi.c: Added checks to the Linux part of
...
sanei_scsi_open_extended, if an SG device file is being
opened
Abel
2002-02-09 16:37:21 +00:00
Abel Deuring
7fbdae8348
sanei/sanei_scsi.c: set timeout value for all operating
...
systems to 1 minute. The timeout value is now derived from
the macro SANE_SCSICMD_TIMEOUT.
Abel
2002-01-20 15:53:22 +00:00
Abel Deuring
1909b7f500
Replaced the configure option --enable-diretio with --enable-scsi-directio
...
and --enable-parport-directio.
NOTE: While I know, what the SCSI direct IO means, I have no idea, what
direct IO means in the context of the parport, so somebody needs to add
some useful description about parport direct io to configure.in and to
README (or README.linux)
2001-12-28 13:26:12 +00:00
Henning Geinitz
c91858cf87
OS/2 changes: Removed semaphore code and
...
increased MAX_DATA to 64k (from "Franz Bakan" <fbakan@gmx.net>).
Henning Meier-Geinitz <henning@meier-geinitz.de>
2001-11-22 20:31:18 +00:00
Abel Deuring
e4867cd08d
Removed the #ifdef SG_IO/#endif around #include linux_sg3_err.h in
...
sanei_scsi.c. Now causes a compiler error, because some macros defined there
are used for the old SG interace too.
Thanks to Henning for discovering the bug
Abel
2001-11-11 22:49:51 +00:00
Abel Deuring
b415404a29
sanei_scsi.c: patches for the Linux part committed: better error handling;
...
the residual return by the SG driver v§ is now ignored
sharp.c: Now retries SCSI READ commands, if sanei_scsi_rweq_wait returns
STATUS_BUSY
Abel
2001-11-11 15:56:50 +00:00