Hugo> Isn't there an easy way to read these settings via the /proc
Hugo> filesystem? I know some other systems use that to obtain
Hugo> settings from the kernel. It would however work only for those
Hugo> systems that do support the /proc filesystem. (Solaris and
Hugo> Linux are the only ones I know of.)
There is. I sent the appended patch to Linus a short while ago. Of
course, you shouldn't rely on this patch being present until it has
been folded into the regular sources.
--david
diff -urN linux-2.1.91/drivers/scsi/sg.c linux-2.1.91-davidm/drivers/scsi/sg.c
--- linux-2.1.91/drivers/scsi/sg.c Thu Feb 26 19:55:28 1998
+++ linux-2.1.91-davidm/drivers/scsi/sg.c Mon Mar 30 22:04:38 1998
@@ -28,6 +28,8 @@
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
+int sg_big_buff = SG_BIG_BUFF; /* for now, sg_big_buff is read-only through sysctl */
+
static int sg_init(void);
static int sg_attach(Scsi_Device *);
static int sg_detect(Scsi_Device *);
diff -urN linux-2.1.91/kernel/sysctl.c linux-2.1.91-davidm/kernel/sysctl.c
--- linux-2.1.91/kernel/sysctl.c Thu Mar 26 12:56:36 1998
+++ linux-2.1.91-davidm/kernel/sysctl.c Mon Mar 30 22:02:50 1998
@@ -45,6 +45,9 @@
extern char modprobe_path[];
extern int kmod_unload_delay;
#endif
+#ifdef CONFIG_CHR_DEV_SG
+extern int sg_big_buff;
+#endif
#ifdef __sparc__
extern char reboot_command [];
@@ -183,6 +186,10 @@
0644, NULL, &proc_dostring, &sysctl_string },
{KERN_KMOD_UNLOAD_DELAY, "kmod_unload_delay", &kmod_unload_delay,
sizeof(int), 0644, NULL, &proc_dointvec},
+#endif
+#ifdef CONFIG_CHR_DEV_SG
+ {KERN_NRFILE, "sg-big-buff", &sg_big_buff, sizeof (int),
+ 0444, NULL, &proc_dointvec},
#endif
{0}
};
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com