Jim Radford writes:
> Hi Richard and Keith,
>
> I've been thinking about the relationship between devfs and modutils.
> I really don't like how spread out all the information is becoming.
>
> devfs.conf:
>
> LOOKUP tts MODLOAD
>
> modules.conf:
>
> alias /dev/tts serial
>
> serial.c:
>
> serial_driver.name = "tts/%d";
>
> What I think would clean things up _significantly_ is if each module
> could provide it's own dependencies, so that a
>
> depmod serial.o
>
> and (something like this)
>
> serial.c:
>
> serial_driver.name = "tts/%d";
> EXPORT_DEV("tts");
>
> defvs.conf:
>
> LOOKUP .* MODLOAD
>
> would create everything needed. All the information would be
> derived from _one_ source.
This idea has some merit. I agree that at the moment things are a bit
cumbersome. I keep getting questions about module autoloading, and
most often people haven't completed all the required steps.
The first thing I should note is that devfsd.conf doesn't need to be
changed. The default MODLOAD entry should be:
LOOKUP .* MODLOAD
Next, it would be a big improvement if the sample modules.conf file
(at least the generic part of it) was hard-coded into modutils. We
already have hard-coded entries for char-major-* and block-major-*, so
I don't see why the devfs names can't be hard-coded as well.
Beyond that, if we're going to add an EXPORT_DEV directive, we should
probably also use it for the major number names, and remove the
hard-coded names from modutils (in the long run: we need to preserve
backwards compatibility). So serial.c would have something like:
EXPORT_DEV("tts");
EXPORT_CHAR_MAJOR(4);
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|