Subject: kern/1975: NetBSD 1.1 SCSI does not support DIOCEJECT
To: None <gnats-bugs@gnats.netbsd.org>
From: Jason Downs <downsj@teeny.org>
List: netbsd-bugs
Date: 01/24/1996 15:35:56
>Number: 1975
>Category: kern
>Synopsis: You can not eject removeable media SCSI disks
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 24 19:05:09 1996
>Last-Modified:
>Originator: Jason Downs
>Organization:
Jason Downs
downsj@teeny.org --> teeny.org: Free Software for a Free Internet <--
http://www.teeny.org/
>Release: 1.1
>Environment:
System: NetBSD threadway 1.1 NetBSD 1.1 (THREADWAY) #27: Wed Jan 24 15:15:19 PST 1996 downsj@threadway:/usr/src/sys/arch/i386/compile/THREADWAY i386
>Description:
The sd driver does not support DIOCEJECT.
>How-To-Repeat:
Try to perform a DIOCEJECT on a removeable media SCSI disk. The
ioctl will be inappropiate.
>Fix:
This is a trivial patch. Why isn't it already supported??
*** sd.c.orig Fri Oct 13 19:55:29 1995
--- sd.c Wed Jan 24 15:15:07 1996
***************
*** 632,637 ****
--- 632,643 ----
sd->flags &= ~SDF_WLABEL;
return 0;
+ case DIOCEJECT:
+ if (!(sd->sc_link->flags & SDEV_REMOVABLE))
+ return EIO;
+
+ return scsi_start(sd->sc_link, SSS_STOP|SSS_LOEJ, 0);
+
default:
if (SDPART(dev) != RAW_PART)
return ENOTTY;
>Audit-Trail:
>Unformatted: