Bail out of acd_open() when we're called with a cdev_t that wasn't created
authorThomas E. Spanjaard <tgen@dragonflybsd.org>
Tue, 9 Jan 2007 20:56:16 +0000 (20:56 +0000)
committerThomas E. Spanjaard <tgen@dragonflybsd.org>
Tue, 9 Jan 2007 20:56:16 +0000 (20:56 +0000)
commit4772abe84d97fedbe62cf732a8ff6fbc48734fc0
tree829d149fe19626cf3066171a154a3430aef4c9f6
parente10027180b7001df6afc66218b75d828977cf58b
Bail out of acd_open() when we're called with a cdev_t that wasn't created
by us. This happened when e.g. booting from cd; 'acd0c' would then be
resolved to minor 2 instead of the minor 0 we create in acd_attach(). If
one, instead of booting the kernel through, exits to the loader prompt from
the bootloader, then issues `unload` and `load kernel`, then `boot`, this
problem wouldn't show up. My guess is, somewhere, somehow, the bootloader
is mucking about in our cdev storeroom. I haven't yet found where this
happens.
sys/dev/disk/nata/atapi-cd.c