sane-project-website/old-archive/1998-02/0090.html

93 wiersze
4.0 KiB
HTML

<!-- received="Sat Feb 14 15:48:54 1998 PST" -->
<!-- sent="Sat, 14 Feb 1998 15:48:54 -0800" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="please test this patch" -->
<!-- id="199802142348.PAA23864@panda.mostang.com" -->
<!-- inreplyto="" -->
<title>sane-devel: please test this patch</title>
<h1>please test this patch</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Sat, 14 Feb 1998 15:48:54 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#90">[ date ]</a><a href="index.html#90">[ thread ]</a><a href="subject.html#90">[ subject ]</a><a href="author.html#90">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0091.html">Kevin R. Charter: "SnapScan backend patch 7: partial SnapScan 310 support"</a>
<li> <b>Next message:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<li> <b>Previous message:</b> <a href="0089.html">David Mosberger-Tang: "Re: Mustek ScanExpress 12000SP"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<li> <b>Reply:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Could folks running Linux please test the following change? You can<br>
apply the change on top of sane-0.70 with:<br>
<p>
cd wherever/sane-0.70<br>
patch -p1 &lt;PATCHFILE <br>
<p>
Then rebuild with "make clean; make" and then "make install" as root.<br>
<p>
Should the patch have any negative effect on the operation of your<br>
scanner, please send me a detailed bug report (scanner model, error<br>
encountered, debug output etc. ;-).<br>
<p>
Non-Linux platforms will need a similar patch to make certain scanners<br>
work (those scanners return a sense code of NOT READY when the scanner<br>
is busy). But I'd need patches from people who can test the changes.<br>
<p>
Thanks,<br>
<p>
--david<br>
<p>
--- sane-0.70/sanei/sanei_scsi.c Mon Jan 26 23:41:50 1998<br>
+++ sane-pre0.71/sanei/sanei_scsi.c Sat Feb 14 15:41:17 1998<br>
@@ -671,7 +726,8 @@<br>
{<br>
nread -= sizeof (req-&gt;cdb.hdr);<br>
<br>
- if (req-&gt;cdb.hdr.result == 0)<br>
+ if (req-&gt;cdb.hdr.result == 0<br>
+ &amp;&amp; (req-&gt;cdb.hdr.sense_buffer[0] &amp; 0x7f) == 0)<br>
{<br>
if (req-&gt;dst)<br>
memcpy (req-&gt;dst, req-&gt;cdb.data, nread);<br>
@@ -685,15 +741,14 @@<br>
{<br>
SANEI_SCSI_Sense_Handler handler<br>
= fd_info[req-&gt;fd].sense_handler;<br>
- void *arg<br>
- = fd_info[req-&gt;fd].sense_handler_arg;<br>
+ void *arg = fd_info[req-&gt;fd].sense_handler_arg;<br>
<br>
DBG(1, "sanei_scsi_req_wait: SCSI command failed: %s\n",<br>
strerror (req-&gt;cdb.hdr.result));<br>
<br>
if (req-&gt;cdb.hdr.result == EBUSY)<br>
status = SANE_STATUS_DEVICE_BUSY;<br>
- else if ((req-&gt;cdb.hdr.sense_buffer[0] &amp; 0x80) &amp;&amp; handler)<br>
+ else if (handler)<br>
status = (*handler) (req-&gt;fd, req-&gt;cdb.hdr.sense_buffer, arg);<br>
else<br>
status = SANE_STATUS_IO_ERROR;<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0091.html">Kevin R. Charter: "SnapScan backend patch 7: partial SnapScan 310 support"</a>
<li> <b>Next message:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<li> <b>Previous message:</b> <a href="0089.html">David Mosberger-Tang: "Re: Mustek ScanExpress 12000SP"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<li> <b>Reply:</b> <a href="0091.html">Rogier Wolff: "Re: please test this patch"</a>
<!-- reply="end" -->
</ul>