From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen) Subject: Re: New winsup snapshot 9/14/98 17 Sep 1998 05:15:41 -0700 Message-ID: <3600FADA.E7577B24.cygnus.cygwin32.developers@cityweb.de> References: <19980914141243 DOT 37248 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: DJ Delorie , cygwin32-developers AT cygnus DOT com DJ Delorie wrote: > How about this idea: Create a real /dev directory in > posix-land. If you look for, say, "/dev/scd0", check for > "/dev/scd0.dll" and support an API for extending > device-space. The API would have to be passed the name you > found it as (scd0) and you'd have to have one copy of the > dll for each device (unless we grokked the trailing digits) > but it would be infinitely expandable. Probably a lot of > work too. Sounds like loadable modules as in linux. Cool idea! What do you think about the following modification? - Default dir: /dev , else, if non existant $CYGROOT/dev , overridable by $CYGWIN_DEVDIR - Create device entries with mknod(1) like symlinks, containing !major,minor,[bcp] as I mentioned before. For 'ls -l' this entries look like normal device entries. E.g. mknod /dev/audio 9 0 c /dev/audio could then contain: !9,0,c 'ls -l' on this file would return: crw-rw-rw- 1 root root 9, 0 Jan 1 1970 /dev/audio - Special module directory, defaults to /usr/lib/modules , else if non existant $CYGROOT/modules , overridable by $CYGWIN_MODDIR and contains DLLs with the naming convention foo.major.dll in the above example e.g. soundblaster.9.dll The 'foo' part is proper boring. Substantially is only the major number in the name, which is used from cygwin to find the device driver. The interface is a generalized fhandler class. I think, it's not too much work and, as you say, it would be infinitely expandable. Corinna