Subject: kern/4984: (scsi) cdrom refuses to open() if no medium is loaded
To: None <>
From: Ignatios Souvatzis <>
List: netbsd-bugs
Date: 02/12/1998 18:02:38
>Number:         4984
>Category:       kern
>Synopsis:       [is] (scsi) cdrom refuses to open() if no medium is loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 12 09:05:07 1998
>Originator:     Ignatios Souvatzis
computer science department, university of Bonn, Germany
>Release:        1.3
System: NetBSD 1.3_ALPHA NetBSD 1.3_ALPHA (COSINUS) #1: Sat Jan 10 01:49:13 CET 1998 i386

I tried to eject the cdrom tray without a medium inserted, and got
eject: /dev/cd0a: open: Input/output error

# eject cdrom
[take medium out]
[press insert button]
# eject cdrom
eject: /dev/cd0a: open: Input/output error

Checking ktrace output, this is correct. (opening /dev/cd0d nstead of
/dev/cd0a, which "eject cdrom" uses, doesn't work, either.
I guess this is related to the open() call enforcing a recalculation of the
fake disklabel on medium change. Of course, this doesn't work without any
medium, but IMO, something should be done to allow access to an empty drive.