devfs
[Top] [All Lists]

Re: DEVFSD and modules - does it really work?

To: "Kevin P. Fleming" <kevin@xxxxxxxxxxxxx>
Subject: Re: DEVFSD and modules - does it really work?
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Sun, 13 May 2001 17:42:50 -0600
Cc: <devfs@xxxxxxxxxxx>
In-reply-to: <002001c0db68$ec727660$65aaa8c0@Kevin>
References: <3518930212.20010511223446@tgos.org> <200105112151.f4BLp7a13310@vindaloo.ras.ucalgary.ca> <002001c0db68$ec727660$65aaa8c0@Kevin>
Sender: owner-devfs@xxxxxxxxxxx
Kevin P. Fleming writes:
> This has got me to thinking about something I thought about when I
> first put devfs/devfsd on my machine; using the "standard" way of
> doing things, if you compile CDROM support as a module, then you
> won't have _any_ /dev entries until after you have loaded that/those
> modules. If you later unload them, the /dev entries stay around and
> will cause the modules to be reloaded if you access them. This is
> good.

Actually, if you unload the modules, the devfs entries should
disappear. If not, that's a bug. A bug I haven't seen before.

> The problem is that the entries don't exist until after you have
> loaded the modules the first time, which kind of defeats the purpose
> of having the CDROM support as a module in the first place. The only
> workaround right now is to set up your /etc/devfsd.conf file to
> force them to be loaded, but this relies on you knowing where your
> CD-ROM drives are located on your IDE busses, and thus compromises
> some of the elegance of using devfs in the first place.

You don't need to know where the CD-ROMs are placed. That's why
accessing via /dev/cdroms is preferred. The /etc/modules.devfs file
provides generic configuration so that the appropriate drivers are
loaded.

> Has any thought ever been given to allowing each module to load,
> identify the devices it can support that are currently attached to
> the machine, register the appropriate devfs entries, then unload
> itself? There are some obvious limits to this (it won't work for
> hot-plugged devices, for one), and of course I could accomplish the
> same thing by manually loading/unloading said modules in one of my
> init scripts, but again, this defeats the elegance of devfs. If this
> just "worked", as the user expected, meaning that if your machine
> has one or mode IDE CD-ROM drives attached, they would appear under
> /dev/cdroms regardless of whether CD-ROM support was modular or
> compiled in, this would make devfs much easier for users to deal
> with.

There has been talk about adding an info section to modules that
modutils can parse, which would contain device name regular
expressions. That could then be passed to devfsd. But that's a more
complex solution. Just use /dev/cdroms instead.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>