Subject: marching unit numbers
To: None <current-users@netbsd.org, tech-kern@netbsd.org>
From: Chris G. Demetriou <cgd@netbsd.org>
List: current-users
Date: 12/29/1999 17:11:49
Some of you may recall that some time ago, probably 6 months or a
year, i said that i'd implement a fix for the 'marching unit numbers'
problem you can see in certain situations with detachable devices.
An example is if you have two PCMCIA 'com' cards, which are configured
as "com* at pcmcia? ...". Assuming the first unit number available
for cloning devices is 3, they'll attach as com3 and com4. if you
then pop the com3 card out and reinsert it, com3 will be detached and
then the card will be attached as com5. if you then pop the com4 card out
and reinsert it, com4 will be detached and then the card will be
attached as com6. and so on.
This isn't particularly useful, obviously. 8-)
(note that if you remove the cards in the reverse of the order in
which they were inserted, i.e. remove the com4 card first, then the
com3 card, the expected thing would happen, i.e. the next com card
inserted would end up being com3.)
I've just made the relatively simple modifications i promised. Now
when a cloning device is attached, it'll get the lowest unit number
available for cloning devices. i.e. if yhou have com3 and com4 as
above, and remove the com3 card and reinsert it, it'll show up again
as com3.
chris
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.