Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!sgiblab!sdd.hp.com!decwrl!decwrl!amdcad!BitBlocks.com!bvs From: bvs@BitBlocks.com (Bakul Shah) Subject: Re: new new scsi release beta2 part 1 of 5 (fixed)SKIP Message-ID: <BvDprK.K8n@BitBlocks.com> Organization: Bit Blocks, Inc. References: <1992Sep23.221352.16254@tfs.com> <1992Sep28.130134.36@vtrm01.uucp> <1992Sep29.000351.8023@tfs.com> <1992Sep29.231322.19770@fcom.cc.utah.edu> Date: Wed, 30 Sep 1992 06:52:31 GMT Lines: 51 terry@cs.weber.edu (A Wizard of Earth C) writes: >What we really need is some way of encapsulating the device name as part of >the entry. MAKEDEV should be part of kernel installation, and should >scan the symbol table and read the cdevsw and bdevsw entries. That >way, we can automatically generate devices from the current kernel >configuration rather than assigning entries at all. One idea is to add a system call that takes a <type,major,minor> tuple and returns its canonical name. If the <type,major,minor> device does not exist, the call fails. There are no holes in the major number sequence and no holes in the minor number sequence for a particular device. Type is either cdev or bdev. This is sufficient for implementing a user level program that cycles through all possible major/minor pairs and constructs a list of device names. It can then compare this new list with the list of existing entries and replace entries that changed. An option can be added to delete entries that are no longer relevant. Note that entries will change only when the kernel device configuration has changed. If and when loadable drivers are implemented, we can simply rerun this program after loading a new driver to make it available. This idea can be further extended to query devices on the SCSI bus and come up with canonical names for them. We did something like this at Fortune Systems back in '81. I don't recall who came up with this idea but it wasn't me. Anyway, this made reconfiguration real easy. >This would >allow us to put several "empty" entries in the table for future allocation >by loadable devices. No need to make the bdevsw/cdevsw tables fixed size when most other tables are not. >Currently, the command line configuration tools are abominable. I shouldn't >have to edit my file (hoping I have the right one) to change an IRQ or add >pty's, config it, change directories (making sure I get the one named the >same as my file), make depend, make, and then manually install the resulting >executable, remembering to delete the devices which are no longer applicable >to my new configuration, and adding the ones which are but did not exist >prior to the most recent rebuild. Some of these steps can be encapsulated in a shell script but yes, we need something fancier for managing the configuration. Bakul Shah <bvs@BitBlocks.com>