From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Non-hardware devices like loop: another idea
Date: Fri, 12 Mar 2004 15:03:00 +0000 [thread overview]
Message-ID: <200403122003.00557.patrakov@ums.usu.ru> (raw)
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
next reply other threads:[~2004-03-12 15:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-12 15:03 Alexander E. Patrakov [this message]
2004-03-17 1:47 ` Non-hardware devices like loop: another idea 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403122003.00557.patrakov@ums.usu.ru \
--to=patrakov@ums.usu.ru \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).