SG_BIG_BUFF woes on Linux

Gerald Turner (gturner@retina.net)
Wed, 20 Jan 1999 23:02:29 -0800 (PST)

I really love sane, thank you developers for such a wonderful program. I
have one gripe with it though, with Linux, sanei_scsi.c is dependent on
the kernel headers scsi/sg.h #define SG_BIG_BUFF. This works but a better
implementation would be to use sysctl() to get the value of sg-big-buff at
runtime, better yet fread() /proc/sys/kernel/sg-big-buff. The reason for
this is it would make it much easier to distribute binaries (Debian, Red
Hat, etc.), anyone who has modified the kernels default SG_BIG_BUFF will
have to compile sane themselves instead of using the binary - with some
trouble too - Debian (and Red Hat too, I beleive) includes kernel headers
in their libc package, so /usr/include/scsi/sg.h is not the same as the
local modified kernel headers (got that?).

I tried to modify sanei_scsi.c myself to use /proc/sys/kernel/sg-big-buff
rather than SG_BIG_BUFF, in hopes to make a patch. But, it is used to
make a static array (u_int8_t data[SG_BIG_BUFF]), and cannot be easily
made into a dynamic array (at least for me it is not easy).

Anyone have any thoughts on this?

Thank you,
Gerald Turner
http://www.retina.net/~gturner/

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com