"Inappropriate ioctl for device" when using scsi_sg
Tim
tim-projects at sentinelchicken.org
Wed Aug 5 01:58:56 UTC 2009
Hello,
I'm trying to port a small piece of software from Linux to FreeBSD
which utilizes the Linux SCSI sg interface. I saw that FreeBSD offers
a similar interface in version 7 and later, so I thought I would give
it a try.
Please pardon my ignorance as I haven't seriously worked with FreeBSD
since 4.x. After searching for hours trying to find a recent
(7.x-based) downloadable live CD (I lack a good system for a full
install), I settled on trying out TrueBSD (version 2.0 RC2) to do my
testing.
The software I'm porting
(http://projects.sentinelchicken.org/tableau-parm/) sends nonstandard
SCSI commands to proprietary devices over USB or Firewire. Under
Linux, these commands are handled in either case using the same sg
interface. I was able to compile my software fine on FreeBSD after a
few minor header file and symbol fixes, but when I attempt to send one
of these commands to the disk device file (/dev/da0 for instance), I
simply receive the error "Inappropriate ioctl for device".
Any ideas what I'm doing wrong? I can provide source code, though it
is almost identical to the current release version (see link above).
Initially I mostly just wanted to ensure I wasn't missing something
obvious. If this isn't the appropriate mailing list, please direct me
to the correct one.
Thanks!
tim
More information about the freebsd-scsi
mailing list