Re: USB device allocation

Khimenko Victor (khim@sch57.msk.ru)
Fri, 8 Oct 1999 01:19:31 +0400 (MSD)


In <37FBBED4.86422588@cgl.uwaterloo.ca> Alex Nicolaou (anicolao@mud.cgl.uwaterloo.ca) wrote:
AN> Khimenko Victor wrote:

>> P.S. It's the same as kerneld/kmod: it's not really needed -- you can load
>> module by hand when needed. But it's convenient to have them autoloaded when
>> needed. The same with devfs: driver is loaded ONLY when I try to use device.
>> It's CAN NOT be done without virtual filesystem.

AN> This is false. A skeletal device driver could be written that traps
AN> open() and inserts the correct kernel module for the device when open is
AN> called, passing the open args to the new driver. As long as there's some
AN> way to tell what the right module to load is based on the filename
AN> passed to open(), this approach should work find and does not require a
AN> virtual filesystem.

Of course "CAN NOT" was not in true mathematical sense of word :-)) You can
just trap all syscalls and do all this without any modifications to kernel.
This is correct. I mean "you can not do it without ugly tricks" of course...

AN> Now, as to which way is more elegant ...

AN> alex

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/