From owner-freebsd-scsi@FreeBSD.ORG Fri Oct 8 16:34:25 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 94EF11065670 for ; Fri, 8 Oct 2010 16:34:25 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E0BA38FC1D for ; Fri, 8 Oct 2010 16:34:24 +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 TAA08961; Fri, 08 Oct 2010 19:34:20 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4CAF480B.3020306@freebsd.org> Date: Fri, 08 Oct 2010 19:34:19 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.9) Gecko/20100920 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: Matthew Jacob References: <4BCDEBF6.3030609@icyb.net.ua> <4CA30B24.8040707@freebsd.org> <4CAEDF48.1030602@freebsd.org> <201010081221.24584.bruce@cran.org.uk> <4CAF31EE.6060409@freebsd.org> <4CAF3C6D.3020003@freebsd.org> <4CAF3D4A.70001@feral.com> In-Reply-To: <4CAF3D4A.70001@feral.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: [HEADSUP] changes to cam_get_device() and 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: Fri, 08 Oct 2010 16:34:25 -0000 on 08/10/2010 18:48 Matthew Jacob said the following: > > > The 'eject on close' variant is a hangover from older stuff. I don't think it is > much used. I believe packages like bacula and amanda just use mtio ioctls directly > on the no-rewind device (haven't worked on tape in a long time, so my recollection > is quite stale). > > I think as long as no-rewind cases are covered, whatever you do that simplifies > things will be a good thing. Matthew, thanks a lot! Here is a new variant of the camlib.c patch: http://people.freebsd.org/~avg/cam_get_device.2.diff I tried to preserve 'n' behavior (and added 'e'), but in a little bit more elaborate fashion. Instead of just checking for a leading 'n' I try to check for a known "non-rewind" peripheral name between the 'n' and unit number. I am aware only of sa(4) driver with such a feature at present. -- Andriy Gapon