Subject: Re: how to pin down sd ad umass?
To: Gary Thorpe <gathorpe79@yahoo.com>
From: None <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 04/05/2007 13:56:22
In message <20070405191428.17268.qmail@web34111.mail.mud.yahoo.com>,
Gary Thorpe writes:
>--- Quentin Garnier <cube@cubidou.net> wrote:
>Hi,
>
>Would it be possible to extend autoconf to allow ranges instead of just
>one number for wired down devices. For example:
>
>
>scsibus4 at umass0
>sd8 at scsibus4
>
>may become:
>
>
>scsibus[4-5] at umass[0-1]
>sd[8-9] at scsibus[4-5]
But is that one sd device, or anything from zero to two (inclusive)?
what if you also add
scsibus[6-7] at umass[0-1]
sd[10-11] at scsibus[6-7]
You might have zero, one, two, three, or four matching "sd" devices.
Which means the second stanza (mine) is still ambiguous. So I'm not
seeing how this change help with your problem, if your proposed syntax
allows more than one range for a given kind of leaf node. Specially
if the ranges overlap. But we could define overlapping ranges for a
given device/bus as a config-time error.
>Is it good idea (if it cannot already be done)? Is this feasible and
>what changes would be needed?
One possible implementation would be to keep track of the
highest (static wired-down, range) unit number. Then start allocating
unit numbers for wildcarded entries at 1 plus the highest unit mentioned
in (static wired, range) devices.
Tho' I expect Jason has a better idea.