From owner-freebsd-bugs Sun Sep 19 21:20: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 07CE315476 for ; Sun, 19 Sep 1999 21:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id VAA12799; Sun, 19 Sep 1999 21:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sun, 19 Sep 1999 21:20:02 -0700 (PDT) Message-Id: <199909200420.VAA12799@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Kenneth D. Merry" Subject: Re: kern/13843: da driver does not support 'CDIOCEJECT' ioctl Reply-To: "Kenneth D. Merry" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/13843; it has been noted by GNATS. From: "Kenneth D. Merry" To: kientzle@acm.org Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: kern/13843: da driver does not support 'CDIOCEJECT' ioctl Date: Sun, 19 Sep 1999 22:15:37 -0600 (MDT) kientzle@acm.org wrote... > Since 'od' isn't a CAM driver, shouldn't 'da' support > the 'CDIOCEJECT' ioctl, which is used to eject a variety > of removable media (e.g., ZIP drives)? > > Having a way to programatically eject ZIP disks is quite > handy; using 'od' on 2.2.X, I had edited rc.shutdown to > eject any ZIP disks, which avoids some painful drive-lettering > problems when you boot Windows. (It also ejects the disk, > which is otherwise impossible---at least for internal > drives---without turning the machine back on.) > > - Tim Kientzle > > >How-To-Repeat: > The command: cdcontrol -f da0 eject > > Does not work with a SCSI internal ZIP drive (nor with an > external parallel-port drive accessed through vp interface). > > >Fix: > It looks like the code might be cut/pasted from scsi_cd.c to scsi_da.c. > I don't know enough about the code to be sure; might be necessary > to check and do this only for removable drives. It seems sort of kludgy to use part of the CD ioctl set with drives that obviously aren't CDROM drives. In any case, there is already a way to eject media from any SCSI device that has removable media: camcontrol eject da0 Note that this won't work unless the disk is unmounted. When the da device is open, removal will be prevented. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message