From: Yaroslav Rastrigin <yarick@relex.ru>
To: Nico Schottelius <nico-kernel@schottelius.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: fun or real: proc interface for module handling?
Date: Thu, 31 Jul 2003 17:13:24 +0400 [thread overview]
Message-ID: <200307311713.24788.yarick@relex.ru> (raw)
In-Reply-To: <20030731121248.GQ264@schottelius.org>
Hi !
On Thursday 31 July 2003 16:12, Nico Schottelius wrote:
> Hello!
>
> I was just joking around here, but what do you think about this idea:
>
> A proc interface for module handling:
> /proc/mods/
> /proc/mods/<module-name>/<link-to-the-modules-use-us>
>
> So we could try to load a module with
> mkdir /proc/mods/ipv6
> and remove it and every module which uses us with
> rm -r /proc/mods/ipv6
>
Well, this idea itsel is quite neat, and could sometimes save lots of time
(esp. when dealing with serious modules' deps). I would like to propose
slightly different appropach:
cp /lib/modules/2.6.0-test2/kernel/drivers/somedriver.ko /proc/modtree
is equivalent to insmod somedriver.ko (or modprobe ?). (How one could pass
module params in the former case ?).
Then, if no other module depends on it, then this entry (under /proc/modtree)
is a file, otherwise its a directory, with all depending modules also either
files or dirs. So, module removal would be as simple as
[ -f /proc/modtree/somedriver ] && rm /proc/modtree/somedriver || \
[ -d /proc/modtree/somedriver ] && rm -rf /proc/modtree/somedriver/* ; \
rm /proc/modtree/somedriver
--
With all the best, yarick at relex dot ru.
next prev parent reply other threads:[~2003-07-31 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-31 12:12 fun or real: proc interface for module handling? Nico Schottelius
2003-07-31 12:34 ` Måns Rullgård
2003-07-31 13:03 ` Gábor Lénárt
2003-07-31 23:15 ` jw schultz
2003-08-01 5:55 ` Stuart Longland
2003-07-31 13:13 ` Yaroslav Rastrigin [this message]
2003-07-31 13:29 ` Nico Schottelius
2003-07-31 23:59 ` Grant Miner
2003-07-31 13:51 John Bradford
2003-08-01 13:54 Downing, Thomas
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=200307311713.24788.yarick@relex.ru \
--to=yarick@relex.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=nico-kernel@schottelius.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).