Mail Archives: cygwin-developers/1998/09/17/05:15:41
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
!<device>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:
!<device>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
- Raw text -