From owner-freebsd-scsi@FreeBSD.ORG Wed Aug 5 23:48:32 2009 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C29E106566C for ; Wed, 5 Aug 2009 23:48:32 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id A5A418FC1E for ; Wed, 5 Aug 2009 23:48:31 +0000 (UTC) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 7EF505C070 for ; Thu, 6 Aug 2009 07:48:30 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 2360955CDB0C; Thu, 6 Aug 2009 07:48:30 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id 5P3mn1owJXXm; Thu, 6 Aug 2009 07:47:29 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 62B2755CDB0A; Thu, 6 Aug 2009 07:47:20 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=XYM6CXp12gwqoTT+xH5KVijRP0fGHcogIBGQEHS0FqTiclNhlKaB3GxsKHKReUl49 +RrhkPoSvlAoYHQyMPs8w== Message-ID: <4A7A19F3.1040207@delphij.net> Date: Wed, 05 Aug 2009 16:46:59 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.22 (X11/20090803) MIME-Version: 1.0 To: Tim References: <20090805013213.GF2654@sentinelchicken.org> In-Reply-To: <20090805013213.GF2654@sentinelchicken.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: "Inappropriate ioctl for device" when using scsi_sg X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2009 23:48:32 -0000 -----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 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-----