sane-project-website/old-archive/1998-03/0212.html

87 wiersze
3.8 KiB
HTML

<!-- received="Mon Mar 30 23:40:03 1998 PST" -->
<!-- sent="Mon, 30 Mar 1998 23:40:02 -0800" -->
<!-- name="David Mosberger-Tang" -->
<!-- email="David.Mosberger@acm.org" -->
<!-- subject="Re: Linux Sense buffer (was: sane 0.71 and microtek E3)" -->
<!-- id="199803310740.XAA00674@panda.mostang.com" -->
<!-- inreplyto="Pine.LNX.3.96.980331092901.26931A-100000@hvdkooij" -->
<title>sane-devel: Re: Linux Sense buffer (was: sane 0.71 and microtek E3)</title>
<h1>Re: Linux Sense buffer (was: sane 0.71 and microtek E3)</h1>
<b>David Mosberger-Tang</b> (<a href="mailto:David.Mosberger@acm.org"><i>David.Mosberger@acm.org</i></a>)<br>
<i>Mon, 30 Mar 1998 23:40:02 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#212">[ date ]</a><a href="index.html#212">[ thread ]</a><a href="subject.html#212">[ subject ]</a><a href="author.html#212">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0213.html">Rogier Wolff: "Re: Artec AT3 and A6000C Plus driver"</a>
<li> <b>Previous message:</b> <a href="0211.html">Hugo van der Kooij: "Re: Linux Sense buffer (was: sane 0.71 and microtek E3)"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt;&gt;&gt;&gt;&gt; On Tue, 31 Mar 1998 09:31:28 +0200 (MET DST), Hugo van der Kooij &lt;<a href="mailto:hvdkooij@caiw.nl">hvdkooij@caiw.nl</a>&gt; said:</i><br>
<p>
Hugo&gt; Isn't there an easy way to read these settings via the /proc<br>
Hugo&gt; filesystem? I know some other systems use that to obtain<br>
Hugo&gt; settings from the kernel. It would however work only for those<br>
Hugo&gt; systems that do support the /proc filesystem. (Solaris and<br>
Hugo&gt; Linux are the only ones I know of.)<br>
<p>
There is. I sent the appended patch to Linus a short while ago. Of<br>
course, you shouldn't rely on this patch being present until it has<br>
been folded into the regular sources.<br>
<p>
--david<br>
<p>
diff -urN linux-2.1.91/drivers/scsi/sg.c linux-2.1.91-davidm/drivers/scsi/sg.c<br>
--- linux-2.1.91/drivers/scsi/sg.c Thu Feb 26 19:55:28 1998<br>
+++ linux-2.1.91-davidm/drivers/scsi/sg.c Mon Mar 30 22:04:38 1998<br>
@@ -28,6 +28,8 @@<br>
#include &lt;scsi/scsi_ioctl.h&gt;<br>
#include &lt;scsi/sg.h&gt;<br>
<br>
+int sg_big_buff = SG_BIG_BUFF; /* for now, sg_big_buff is read-only through sysctl */<br>
+<br>
static int sg_init(void);<br>
static int sg_attach(Scsi_Device *);<br>
static int sg_detect(Scsi_Device *);<br>
diff -urN linux-2.1.91/kernel/sysctl.c linux-2.1.91-davidm/kernel/sysctl.c<br>
--- linux-2.1.91/kernel/sysctl.c Thu Mar 26 12:56:36 1998<br>
+++ linux-2.1.91-davidm/kernel/sysctl.c Mon Mar 30 22:02:50 1998<br>
@@ -45,6 +45,9 @@<br>
extern char modprobe_path[];<br>
extern int kmod_unload_delay;<br>
#endif<br>
+#ifdef CONFIG_CHR_DEV_SG<br>
+extern int sg_big_buff;<br>
+#endif<br>
<br>
#ifdef __sparc__<br>
extern char reboot_command [];<br>
@@ -183,6 +186,10 @@<br>
0644, NULL, &amp;proc_dostring, &amp;sysctl_string },<br>
{KERN_KMOD_UNLOAD_DELAY, "kmod_unload_delay", &amp;kmod_unload_delay,<br>
sizeof(int), 0644, NULL, &amp;proc_dointvec},<br>
+#endif<br>
+#ifdef CONFIG_CHR_DEV_SG<br>
+ {KERN_NRFILE, "sg-big-buff", &amp;sg_big_buff, sizeof (int),<br>
+ 0444, NULL, &amp;proc_dointvec},<br>
#endif<br>
{0}<br>
};<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="0213.html">Rogier Wolff: "Re: Artec AT3 and A6000C Plus driver"</a>
<li> <b>Previous message:</b> <a href="0211.html">Hugo van der Kooij: "Re: Linux Sense buffer (was: sane 0.71 and microtek E3)"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>