Subject: Re: Call for review: The New Block/Character Device Switch
To: None <matt@3am-software.com>
From: MAEKAWA Masahide <maekawa@math.sci.kobe-u.ac.jp>
List: tech-kern
Date: 07/02/2001 09:16:19
Matt Thomas <matt@3am-software.com> wrote:
>At 01:25 PM 6/28/2001 +0900, MAEKAWA Masahide wrote:
>>d_major         - An alias to the major number to avoid linear searching 
>>tables
>>                   (should be -1 in the source. In initialization phase or
>>                    dynamically attach phase, filled out by proper value.)
>>d_name          - An alias of bdevsw/cdevsw to search by name
>>                   (should be same as a devbase and be null-teminated.)
>
>I've been mulling this over for a while and I think the proper place for the
>d_major number(s) is in the cfdriver struct.  cd_bmajor, cd_cmajor, cd_devsw.
>
>
>>device-switch <name> chr <num> [blk <num>] [<options>]
>>
>>name            - The prefix of bdevsw/cdevsw entry (required)
>>chr             - A character major number (required)
>>blk             - A block major number (optional)
>>options         - Conditions to determine whether should be attached or not
>>                   (optional)
>
>The more I ponder this, the less I like it.  Why extend the current
>
>major { wd = 17 }
>
>options are needed.  if you put a cfdriver for <name> in ioconf.c, you emit the
>hooks for devsw as well.
>
>major { wd = { block 17 } { char 27 } }

How about pseudo-devices, cn, ctty, swap, memory, log, filedesc and so on?

--- MAEKAWA Masahide