sane-project-website/old-archive/1997-02/0018.html

87 wiersze
3.8 KiB
HTML

<!-- received="Tue Mar 18 22:13:55 1997 MST" -->
<!-- sent="Tue, 18 Mar 1997 22:08:43 -0700" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="davidm@azstarnet.com" -->
<!-- subject="Re: Microtek Sane Backend" -->
<!-- id="199703190508.WAA12242@panda.mosberger" -->
<!-- inreplyto="Microtek Sane Backend" -->
<title>sane-devel: Re: Microtek Sane Backend</title>
<h1>Re: Microtek Sane Backend</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:davidm@azstarnet.com"><i>davidm@azstarnet.com</i></a>)<br>
<i>Tue, 18 Mar 1997 22:08:43 -0700</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#18">[ date ]</a><a href="index.html#18">[ thread ]</a><a href="subject.html#18">[ subject ]</a><a href="author.html#18">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<li> <b>Previous message:</b> <a href="0017.html">Nem W Schlecht: "Microtek Sane Backend"</a>
<li> <b>Maybe in reply to:</b> <a href="0017.html">Nem W Schlecht: "Microtek Sane Backend"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<li> <b>Reply:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Tue, 18 Mar 1997 21:09:45 -0600 (CST), Nem W Schlecht &lt;<a href="mailto:nem@abattoir.cc.ndsu.nodak.edu">nem@abattoir.cc.ndsu.nodak.edu</a>&gt; said:</i><br>
<p>
Nem&gt; Just to let everybody on the list know.. I've gotten Jan S.'s<br>
Nem&gt; mtekscan command line program working and will soon start<br>
Nem&gt; working on a SANE backend. I've already started and am half<br>
Nem&gt; done with a port of the scsi stuff to my machine. One problem,<br>
Nem&gt; though. It appears that the Linux stuff is pretty low-level.<br>
Nem&gt; My stuff is actually pretty similar, but with one major<br>
Nem&gt; difference. There is a structure that is used for SCSI<br>
Nem&gt; communications, but it requires setting either a READ or WRITE<br>
Nem&gt; flag.<br>
<p>
I just added generic SCSI support for HP-UX today (completely untested<br>
though). I'm guessing it is similar to what SGI uses. Take a look at<br>
what's below and see how close that is.<br>
<p>
--david<br>
<pre>
--
SANE_Status
sanei_scsi_cmd (int fd, const void * src, size_t src_size,
void * dst, size_t * dst_size)
{
struct sctl_io hdr;
<p>
memset (&amp;hdr, 0, sizeof (hdr));
memcpy (hdr.cdb, src, src_size);
hdr.flags = (dst_size &gt; 0) ? SCTL_READ : 0;
hdr.cdb_length = src_size;
hdr.data = dst;
hdr.data_length = *dst_size;
hdr.max_msecs = 60000; /* 1 minute timeout */
if (ioctl (fd, SIOC_IO, &amp;hdr) &lt; 0)
{
DBG(1, "sanei_scsi_cmd: ioctl(SIOC_IO) failed: %s\n",
strerror (errno));
return SANE_STATUS_IO_ERROR;
}
if (hdr.cdb_status)
DBG(1, "sanei_scsi_cmd: SCSI completed with cdb_status=%d\n",
hdr.cdb_status);
*dst_size = hdr.data_xfer;
return SANE_STATUS_GOOD;
}
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: mail -s unsubscribe <a href="mailto:sane-devel-request@listserv.azstarnet.com">sane-devel-request@listserv.azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<li> <b>Previous message:</b> <a href="0017.html">Nem W Schlecht: "Microtek Sane Backend"</a>
<li> <b>Maybe in reply to:</b> <a href="0017.html">Nem W Schlecht: "Microtek Sane Backend"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<li> <b>Reply:</b> <a href="0019.html">Nem W Schlecht: "Re: Microtek Sane Backend"</a>
<!-- reply="end" -->
</ul>