From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 20 18:01:30 2010 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 8E5BF1065674 for ; Tue, 20 Apr 2010 18:01:30 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D77708FC1B for ; Tue, 20 Apr 2010 18:01:29 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA00996 for ; Tue, 20 Apr 2010 21:01:27 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4BCDEBF6.3030609@icyb.net.ua> Date: Tue, 20 Apr 2010 21:01:26 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100319) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: cam.3: do not discourage use of cam_open_device X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2010 18:01:30 -0000 This is based on my understanding what Scott Long tried to explain me a while ago. Index: lib/libcam/cam.3 =================================================================== --- lib/libcam/cam.3 (revision 206902) +++ lib/libcam/cam.3 (working copy) @@ -190,12 +190,6 @@ Once the device name and unit number are determined, a lookup is performed to determine the passthrough device that corresponds to the given device. -.Fn cam_open_device -is rather simple to use, but it is not really suitable for general use -because its behavior is not necessarily deterministic. -Programmers writing -new applications should make the extra effort to use one of the other open -routines documented below. .Pp .Fn cam_open_spec_device opens the It seems that this warning about ambiguity came from pre-devfs days when e.g. cd0 nodes in different directories could correspond to different actual SCSI peripherals. It seems that there wasn't an ambiguity if an absolute device path was given. Nowadays, cam_open_device seems to always do a proper job of finding a correct pass device. -- Andriy Gapon