Date: Tue, 4 Aug 2009 18:32:14 -0700 From: Tim <tim-projects@sentinelchicken.org> To: freebsd-scsi@freebsd.org Subject: "Inappropriate ioctl for device" when using scsi_sg Message-ID: <20090805013213.GF2654@sentinelchicken.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090805013213.GF2654>