> I'm trying to write to a 9 GB disk as a raw scsi device.
> The disk is on a SPARC running SunOS 4.1.4, and is scsi device 3.
> I can open the device using the call
> fd = open("/dev/rsd3a",O_WRONLY);
> without any errors, but when I try to write to it I get the perror message:
> "Invalid argument".
> As far as I can tell this means that I'm trying to write to a stream linked
> below a multiplexor, which the OS doesn't like. This error is mentionned
> in paragraph 3 of the man page for streamio(4), but I can't seem to find
> any other information explaining how to deal with this problem.
The STREAMS subsystem shouldn't be going anywhere near a raw disk
interface. I think you're looking at the wrong place in the man
pages. The reason a system call fails "Invalid argument" is
self-evident. One (or more) of the arguments to the system call is
wrong. For reads and writes to the raw disk, the most likely invalid
arguments are reading/writing data that isn't properly aligned in
memory or else using a byte count which isn't some multiple of the
fundamental block size of the device.