Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Aug 2009 16:46:59 -0700
From:      Xin LI <delphij@delphij.net>
To:        Tim <tim-projects@sentinelchicken.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: "Inappropriate ioctl for device" when using scsi_sg
Message-ID:  <4A7A19F3.1040207@delphij.net>
In-Reply-To: <20090805013213.GF2654@sentinelchicken.org>
References:  <20090805013213.GF2654@sentinelchicken.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Tim,

Tim wrote:
> 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.
[...]
> 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. 

My understanding is that, by default (GENERIC), sg device is not
compiled into the kernel, so, in order to use it, you may have to
compile your own kernel and add:

	device sg

In the configuration.  The device would appear as "/dev/sg0", etc.;
Linux style "/dev/sga /dev/sgb" would appear as symlinks.

Cheers,
- --
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkp6GfIACgkQi+vbBBjt66DTKwCfe8I/ijSY4LifmqRghfd9Gbmi
424AoItYL9LxrUOEdi2JGMSHAGEMX5Qs
=AHh0
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A7A19F3.1040207>