From owner-freebsd-current Wed Aug 18 12:29:43 1999 Delivered-To: freebsd-current@freebsd.org Received: from rah.star-gate.com (216-200-29-190.snj0.flashcom.net [216.200.29.194]) by hub.freebsd.org (Postfix) with ESMTP id E9EB515930 for ; Wed, 18 Aug 1999 12:29:29 -0700 (PDT) (envelope-from hasty@rah.star-gate.com) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.9.3/8.8.8) with ESMTP id MAA01073; Wed, 18 Aug 1999 12:28:23 -0700 (PDT) (envelope-from hasty@rah.star-gate.com) Message-Id: <199908181928.MAA01073@rah.star-gate.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Kenneth D. Merry" Cc: dillon@apollo.backplane.com (Matthew Dillon), wilko@yedi.iaf.nl (Wilko Bulte), current@FreeBSD.ORG Subject: Re: [re]writable cdrom drive In-reply-to: Your message of "Wed, 18 Aug 1999 13:15:55 MDT." <199908181915.NAA21502@panzer.kdm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Wed, 18 Aug 1999 12:28:23 -0700 From: Amancio Hasty Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Amancio Hasty wrote... > > I have to agree with Matt on this plus the set of defaults is system = wide . > = > What are you agreeing with him on? Why not quote what you're talking > about? > = > > Is it possible to get a system bus enumeration from the system so = > > a program such a cdrecord can attempt to make an intelligent > > decision as to which device is the cd recorder for instance we > > know that the system can print the device's name and its > > scsi address: > = > If you want a bus number, there's a really easy way to get it: > = > # camcontrol devlist > at scbus0 target 3 lun 0 (pass0,ch0)= > at scbus0 target 4 lun 0 (pass1,sa0)= > at scbus1 target 0 lun 0 (pass2,da0)= > at scbus1 target 1 lun 0 (pass3,da1)= > at scbus1 target 3 lun 0 (pass4,cd0)= > at scbus1 target 6 lun 0 (pass5,cd1)= > at scbus2 target 0 lun 0 (pass6,da2)= > = > So, in this case, the bus,target,lun combination for my CD-R is 1,3,0. > = > cdrecord itself also has a slightly more obtuse way of doing the same > thing: > = > # cdrecord -scanbus > Cdrecord release 1.8a22 Copyright (C) 1995-1999 J=F6rg Schilling > scsibus0: > 0) * > 1) * > 2) * > 3) 'EXABYTE ' 'EXB-10i ' '2.6 ' Removable Juk= e Box > 4) 'EXABYTE ' 'EXB-8500-85Qanx0' '0415' Removable Tap= e > 5) * > 6) * > 7) * > scsibus1: > 100) 'SEAGATE ' 'ST31230W ' '0510' Disk > 101) 'SEAGATE ' 'ST32155N ' '0318' Disk > 102) * > 103) 'PLEXTOR ' 'CD-R PX-R412C ' '1.04' Removable CD-= ROM > 104) * > 105) * > 106) 'PLEXTOR ' 'CD-ROM PX-4XCS ' '1.04' Removable CD-= ROM > 107) * > scsibus2: > 200) 'SEAGATE ' 'ST34371N ' '0484' Disk > 201) * > 202) * > 203) * > 204) * > 205) * > 206) * > 207) * > = > The camcontrol output is easier to figure out, though. > = > Ken This is about ease of use . cdrecord in the absence of a device specifica= tion = should query the bus and present the user with a choice of cd recorder devices i= deally if there is one cd recorder it should go ahead an use it if such behavior= is = not desired then create an option "--confirm" to ask the user if its okay= to use the "guessed" cd recorder. camcontrol is a generic scsi command line interface and very nice . What = I am = after is a generic bus enumerator API so apps like cd recorder or fxtv can use= to locate the device in the absence of a specified device. Cheers -- = Amancio Hasty hasty@rah.star-gate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message