linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Non-hardware devices like loop: another idea
@ 2004-03-12 15:03 Alexander E. Patrakov
  2004-03-17  1:47 ` Mike Snitzer
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Alexander E. Patrakov @ 2004-03-12 15:03 UTC (permalink / raw)
  To: linux-hotplug

Recently I stated that I am working on solution to the "chicken-and-egg" 
problem related to devices like /dev/loop*, /dev/nbd*, /dev/ppp and so on, 
which require no hardware and therefore are not detectable by the hotplug 
scripts.

My (bad) idea was to include the sysfs entries that would appear after loading 
the module in the module itself by means of the MODULE_INFO macro, and then 
modify depmod to populate /lib/modules/<version>/sys and use it to 
populate /dev with the corresponding entries (the UDEV_TEST environment 
variable already allows us to override the location of the sysfs directory). 
Then the char-major magic will load these modules on demand.

I have a proof-of-concept implementation (will mail it here if there is any 
demand). The list of files altered:

module-init-tools-3.0-pre5/depmod.c
linux-2.6.4/include/linux/module.h
linux-2.6.4/drivers/block/loop.c
linux-2.6.4/drivers/char/rtc.c
linux-2.6.4/drivers/net/ppp_generic.c
...and my udev initscript

This is not a real, but a proof-of-concept implementation because there are 
much more such non-hardware modules. This works,

--- BUT! ---

I found my implementation rather clumsy and while implementing it I decided 
that it would be better to just mark such modules and modprobe tham all, and 
make the hotplug script modprobe other stuff. I decided to start implementing 
such mark... and found that it has already been done, so actually no patches 
are needed except for the udev initscript!

I am talking about /lib/modules/<version>/modules.alias.

The simple idea is to grep this file (and probably /etc/modprobe.conf also) 
for lines containing char-major and block-major. The list pretty much 
coincides with the list of non-hardware-related modules that nevertheless 
provide devices.

Does anyone care to include this into the future release of udev?

-- 
Alexander E. Patrakov


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-03-18 10:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-12 15:03 Non-hardware devices like loop: another idea Alexander E. Patrakov
2004-03-17  1:47 ` Mike Snitzer
2004-03-17  4:13 ` Alexander E. Patrakov
2004-03-17  4:26 ` Mike Snitzer
2004-03-17  6:39 ` Alexander E. Patrakov
2004-03-17 17:01 ` Mike Snitzer
2004-03-18  3:56 ` Alexander E. Patrakov
2004-03-18  4:24 ` Greg KH
2004-03-18  4:55 ` Mike Snitzer
2004-03-18  9:55 ` Alexander E. Patrakov
2004-03-18  9:58 ` Alexander E. Patrakov
2004-03-18 10:23 ` Marco d'Itri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).